Add central variable setting bootstrap directory
Prepare for moving bootstrap directory to conform to new ignore pattern of autostow.sh script. Bootstrap directory can be overwritten through environment variable BOOTSTRAP_DIRECTORY, however for now it still rigidly requires the existence of an install_packages.sh file and an autostow.sh file which it wants to execute.
This commit is contained in:
parent
a3a1c4a5bd
commit
b702158b7c
1 changed files with 6 additions and 4 deletions
10
install.sh
10
install.sh
|
@ -8,13 +8,15 @@
|
||||||
#
|
#
|
||||||
# Will symlink all my dotfiles into their correct places using autostow.sh
|
# Will symlink all my dotfiles into their correct places using autostow.sh
|
||||||
|
|
||||||
|
bootstrap_dir="${BOOTSTRAP_DIRECTORY:-./bootstrap}"
|
||||||
|
|
||||||
main() {
|
main() {
|
||||||
local cmd=""
|
local cmd=""
|
||||||
local ret=0
|
local ret=0
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
-v | --version)
|
-v | --version)
|
||||||
printf "Personal system bootstrap script.\n\n©Marty Oehme\n\nVersion: 0.1\n"
|
printf "Personal system bootstrap script.\n\n©Marty Oehme\n\nVersion: 0.1.1\n"
|
||||||
;;
|
;;
|
||||||
-h | --help)
|
-h | --help)
|
||||||
printf "Usage: install [-f|--force][-v|--version][-h|--help]\n\n-f Do not ask for any confirmations but force update and installation.\n"
|
printf "Usage: install [-f|--force][-v|--version][-h|--help]\n\n-f Do not ask for any confirmations but force update and installation.\n"
|
||||||
|
@ -50,15 +52,15 @@ install() {
|
||||||
echo "====================== BEGINNING INSTALLATION ============================="
|
echo "====================== BEGINNING INSTALLATION ============================="
|
||||||
if ! "$unattended"; then
|
if ! "$unattended"; then
|
||||||
export BOOTSTRAP_PACKAGES="bootstrap/packages.csv"
|
export BOOTSTRAP_PACKAGES="bootstrap/packages.csv"
|
||||||
./bootstrap/install_packages.sh
|
"$bootstrap_dir"/install_packages.sh
|
||||||
else
|
else
|
||||||
export BOOTSTRAP_PACKAGES="bootstrap/packages.csv"
|
export BOOTSTRAP_PACKAGES="bootstrap/packages.csv"
|
||||||
./bootstrap/install_packages.sh -f
|
"$bootstrap_dir"/install_packages.sh -f
|
||||||
fi
|
fi
|
||||||
unset BOOTSTRAP_PACKAGES
|
unset BOOTSTRAP_PACKAGES
|
||||||
|
|
||||||
echo "=================== BEGINNING DOTFILE MANAGEMENT =========================="
|
echo "=================== BEGINNING DOTFILE MANAGEMENT =========================="
|
||||||
./bootstrap/autostow.sh -s
|
"$bootstrap_dir"/autostow.sh -s
|
||||||
|
|
||||||
echo "====================== INSTALLATION FINISHED =============================="
|
echo "====================== INSTALLATION FINISHED =============================="
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue