Skip to content

Instantly share code, notes, and snippets.

@ademers
Forked from curtisblackwell/README.md
Created October 14, 2012 15:42
Show Gist options
  • Save ademers/3888963 to your computer and use it in GitHub Desktop.
Save ademers/3888963 to your computer and use it in GitHub Desktop.
Statamic setup script

This script will:

  1. Remove the following files/directories:

    • _config/fieldsets/* (everything in dir)
    • _config/settings.yaml.sample
    • _config/users/admin.yaml.sample
    • _content/* (everything in dir)
    • _themes/london-wild
    • assets/img
    • check.php
    • sample.htaccess
  2. Collect your information to create an admin account, complete with boilerplate bio.

  3. Set your _content and _config/users dirs to 777. I'm not yet sure that's best practice, but I can't find it in the docs/forums, and I couldn't get it to work otherwise.

#! /bin/bash
rm -r _config/fieldsets/* _config/settings.yaml.sample _config/users/admin.yaml.sample _content/* _themes/london-wild assets/img check.php sample.htaccess
echo "What's your username?"
read -e USERNAME
echo "What's your password?"
read -e PASSWORD
echo "What's your first name?"
read -e FIRSTNAME
echo "What's your last name?"
read -e LASTNAME
echo "What's your email address?"
read -e EMAIL
echo "Are you a him, her, it, or perhaps something else?"
read -e GENDERID
echo "_site_name:"
read -e SITENAME
echo "---
first_name: $FIRSTNAME
last_name: $LASTNAME
roles: [admin]
password: $PASSWORD
---
$FIRSTNAME $LASTNAME is the developer of $SITENAME. If you experience any problems or have any questions, please contact $GENDERID at $EMAIL." > _config/users/$USERNAME.yaml
chmod -R 777 _content _config/users
@curtisblackwell
Copy link

@ademers, this script has been discontinued in favor of cpb Statamechanic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment