mirror of
https://github.com/natelandau/shell-scripting-templates.git
synced 2025-11-08 13:13:47 -05:00
69 lines
1.3 KiB
Bash
Executable File
69 lines
1.3 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
# ##################################################
|
|
# This script cycles through all my setup scripts. Run
|
|
# this script when you are starting fresh on a computer and
|
|
# it will take care of everything.
|
|
#
|
|
# HISTORY
|
|
# * 2015-01-02 - Initial creation
|
|
#
|
|
# ##################################################
|
|
|
|
# Source global utilities
|
|
if [ -f "../lib/utils.sh" ]; then
|
|
source "../lib/utils.sh"
|
|
else
|
|
echo "You must have utils.sh to run. Exiting."
|
|
exit
|
|
fi
|
|
|
|
seek_confirmation "Do you want to run the Dropbox script to install it first?"
|
|
if is_confirmed; then
|
|
if is_file "./dropbox.sh"; then
|
|
./dropbox.sh
|
|
else
|
|
e_error "Can't find dropbox.sh"
|
|
seek_confirmation "Continue running other scripts?"
|
|
if is_not_confirmed; then
|
|
e_error "Exiting"
|
|
exit 0
|
|
fi
|
|
fi
|
|
fi
|
|
|
|
#List of Scripts to be run
|
|
FILES="
|
|
./homebrew.sh
|
|
./casks.sh
|
|
./ruby.sh
|
|
./mackup.sh
|
|
./osx.sh
|
|
./ssh.sh
|
|
"
|
|
|
|
seek_confirmation "Do you want to run all the scripts at once?"
|
|
if is_confirmed; then
|
|
for file in $FILES
|
|
do
|
|
if is_file "$file"; then
|
|
$file
|
|
else
|
|
e_error "$file does not exist. Exiting"
|
|
exit 0
|
|
fi
|
|
done
|
|
else
|
|
for file in $FILES
|
|
do
|
|
seek_confirmation "Do you want to run $file?"
|
|
if is_confirmed; then
|
|
if is_file "$file"; then
|
|
$file
|
|
else
|
|
e_error "$file does not exist."
|
|
fi
|
|
fi
|
|
done
|
|
fi
|