Improve cmd option helptext, simplify install function
This commit is contained in:
parent
9367b77b7f
commit
d5f5304dcf
1 changed files with 3 additions and 7 deletions
10
.config/bootstrap/install.sh
Normal file → Executable file
10
.config/bootstrap/install.sh
Normal file → Executable file
|
|
@ -8,8 +8,8 @@
|
|||
# unset our temp variables, just in case they were used for something else in shell
|
||||
unset pkgfiles dotfilesrepo targetuser targetpassword targetdeployment quietmode aurhelper loginshell
|
||||
|
||||
while getopts ":a:r:p:u:U:f:F:hq" o; do case "${o}" in
|
||||
h) printf "Optional arguments for custom use:\\n -r: Dotfiles repository (local file or url)\\n -p: Dependencies and programs csv (local file or url)\\n -a: AUR helper (must have pacman-like syntax)\\n -h: Show this message\\n" && exit ;;
|
||||
while getopts ":a:r:f:F:t:s:h" o; do case "${o}" in
|
||||
h) printf "Optional arguments for custom use:\\n -r: Dotfiles repository (local file or url)\\n -f: Dependencies and programs csv alongside defaults (local file or url)\\n -F: Dependencies and programs csv replacing defaults (local file or url)\\n -a: AUR helper (must have pacman-like syntax), defaults to yay\\n -t: Target deployment (laptop, desktop, headless, none) to set up relevant package function groups\\n -s: Default user shell. Must be a full path to the shell (/bin/zsh by default).\n -h: Show this message\\n" && exit ;;
|
||||
r) dotfilesrepo=${OPTARG} && git ls-remote "$dotfilesrepo" || exit ;;
|
||||
a) aurhelper=${OPTARG} ;;
|
||||
f) pkgfiles=${OPTARG} ;;
|
||||
|
|
@ -169,10 +169,6 @@ putgitrepo() { # Downlods a gitrepo $1 and places the files in $2 only overwriti
|
|||
dotfiles $dfdir config status.showUntrackedFiles no
|
||||
}
|
||||
|
||||
setloginshell() {
|
||||
chsh -s $loginshell $name
|
||||
}
|
||||
|
||||
serviceinit() { for service in "$@"; do
|
||||
dialog --infobox "Enabling \"$service\"..." 4 40
|
||||
systemctl enable "$service"
|
||||
|
|
@ -262,7 +258,7 @@ putgitrepo "$dotfilesrepo" "/home/$name"
|
|||
rm "/home/$name/README.md"
|
||||
|
||||
# Set user login shell to desired shell - usually zsh
|
||||
setloginshell
|
||||
chsh -s $loginshell $name
|
||||
|
||||
# Pulseaudio, if/when initially installed, often needs a restart to work immediately.
|
||||
[ -f /usr/bin/pulseaudio ] && resetpulse
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue