Non-interactive setup
This commit is contained in:
parent
5729004665
commit
d6cdb0f582
14
setup
14
setup
|
@ -2,6 +2,17 @@
|
|||
|
||||
# TODO: ascii art header
|
||||
|
||||
INTERACTIVE=1
|
||||
|
||||
while test $# -gt 0; do
|
||||
case "$1" in
|
||||
-x|--non-interactive)
|
||||
INTERACTIVE=0
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
dfp=$(cd "$(dirname "${BASH_SOURCE[0]}" )/" && pwd)
|
||||
source "${dfp}/scripts/setup_helpers.bash"
|
||||
|
||||
|
@ -83,8 +94,10 @@ links=(
|
|||
"$dfp/shell/user-dirs" "$XDG_CONFIG_HOME/user-dirs.dirs"
|
||||
)
|
||||
|
||||
# TODO: pass interactive?
|
||||
_dotfiles_setup_run_setup "$dfp/.agreed-to-erasing-files.lock" "${links[@]}"
|
||||
|
||||
if [[ "$INTERACTIVE" = 1 ]]; then
|
||||
echo -n -e "Do you want to run the sudo_setup script for changes to /etc"
|
||||
echo -n -e "\nand other root directories?"
|
||||
read -r -p " [y/N] " response
|
||||
|
@ -95,3 +108,4 @@ fi
|
|||
|
||||
echo -e "Dotfiles Installed! Running 'exec bash'...\n"
|
||||
exec bash
|
||||
fi
|
||||
|
|
Reference in a new issue