diff options
Diffstat (limited to 'lib/subcommands')
-rw-r--r-- | lib/subcommands/init.bash (renamed from lib/subcommands/bootstrap.bash) | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/lib/subcommands/bootstrap.bash b/lib/subcommands/init.bash index 5a0f4ae..9194076 100644 --- a/lib/subcommands/bootstrap.bash +++ b/lib/subcommands/init.bash @@ -10,15 +10,15 @@ subcommand() if [[ -z "$remote" ]] then - info "bootstrap" "No remote given, bootstrapping from scratch" - bootstrap_local + info "init" "No remote given, initping from scratch" + init_local return fi - bootstrap_remote "$remote" + init_remote "$remote" } -bootstrap_local() +init_local() { local dirs=( "$BASHTARD_ETCDIR" @@ -39,22 +39,22 @@ bootstrap_local() for dir in "${dirs[@]}" do - notice "bashtard/bootstrap" "Creating $dir" + notice "bashtard/init" "Creating $dir" mkdir -p -- "$dir" done for file in "${files[@]}" do - notice "bashtard/bootstrap" "Creating $file" + notice "bashtard/init" "Creating $file" touch -- "$file" done } -bootstrap_remote() +init_remote() { local remote="$1" ; shift - notice "bootstrap" "Cloning $remote to $BASHTARD_ETCDIR" + notice "init" "Cloning $remote to $BASHTARD_ETCDIR" git clone "$remote" "$BASHTARD_ETCDIR" local files=( @@ -67,13 +67,13 @@ bootstrap_remote() do [[ -f "$file" ]] && continue - notice "bashtard/bootstrap" "Creating $file" + notice "bashtard/init" "Creating $file" touch -- "$file" done while read -r playbook url _ do - notice "bashtard/bootstrap" "Cloning $playbook from $url" + notice "bashtard/init" "Cloning $playbook from $url" git clone "$url" "$BASHTARD_ETCDIR/playbooks.d/$playbook" # TODO: Clone appropriate branch |