Merge branch '9-change-shell-to-specified-shell-on-installation' into 'master'
Resolve "Change shell to specified shell on installation" Closes #9 See merge request marty-oehme/dotfiles!2
This commit is contained in:
commit
9f8b7eb0b8
1 changed files with 8 additions and 3 deletions
11
.config/bootstrap/install.sh
Normal file → Executable file
11
.config/bootstrap/install.sh
Normal file → Executable file
|
@ -6,15 +6,16 @@
|
||||||
### OPTIONS AND VARIABLES ###
|
### OPTIONS AND VARIABLES ###
|
||||||
|
|
||||||
# unset our temp variables, just in case they were used for something else in shell
|
# unset our temp variables, just in case they were used for something else in shell
|
||||||
unset pkgfiles dotfilesrepo targetuser targetpassword targetdeployment quietmode aurhelper
|
unset pkgfiles dotfilesrepo targetuser targetpassword targetdeployment quietmode aurhelper loginshell
|
||||||
|
|
||||||
while getopts ":a:r:p:u:U:f:F:hq" o; do case "${o}" in
|
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 -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 ;;
|
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 ;;
|
r) dotfilesrepo=${OPTARG} && git ls-remote "$dotfilesrepo" || exit ;;
|
||||||
a) aurhelper=${OPTARG} ;;
|
a) aurhelper=${OPTARG} ;;
|
||||||
f) pkgfiles=${OPTARG} ;;
|
f) pkgfiles=${OPTARG} ;;
|
||||||
F) pkgfiles=${OPTARG} && exclusivepkgfiles=true ;;
|
F) pkgfiles=${OPTARG} && exclusivepkgfiles=true ;;
|
||||||
t) targetdeployment=${OPTARG} ;;
|
t) targetdeployment=${OPTARG} ;;
|
||||||
|
s) loginshell=${OPTARG} ;;
|
||||||
*) printf "Invalid option: -%s\\n" "$OPTARG" && exit ;;
|
*) printf "Invalid option: -%s\\n" "$OPTARG" && exit ;;
|
||||||
esac done
|
esac done
|
||||||
|
|
||||||
|
@ -22,6 +23,7 @@ esac done
|
||||||
[ -z "$dotfilesrepo" ] && dotfilesrepo="https://gitlab.com/marty-oehme/dotfiles.git"
|
[ -z "$dotfilesrepo" ] && dotfilesrepo="https://gitlab.com/marty-oehme/dotfiles.git"
|
||||||
[ -z "$pkgfiles" ] && pkgfiles=""
|
[ -z "$pkgfiles" ] && pkgfiles=""
|
||||||
[ -z "$aurhelper" ] && aurhelper="yay"
|
[ -z "$aurhelper" ] && aurhelper="yay"
|
||||||
|
[ -z "$loginshell" ] && loginshell="/bin/zsh"
|
||||||
|
|
||||||
### FUNCTIONS ###
|
### FUNCTIONS ###
|
||||||
|
|
||||||
|
@ -255,6 +257,9 @@ installationloop $tmpfile
|
||||||
putgitrepo "$dotfilesrepo" "/home/$name"
|
putgitrepo "$dotfilesrepo" "/home/$name"
|
||||||
rm "/home/$name/README.md"
|
rm "/home/$name/README.md"
|
||||||
|
|
||||||
|
# Set user login shell to desired shell - usually zsh
|
||||||
|
chsh -s $loginshell $name
|
||||||
|
|
||||||
# Pulseaudio, if/when initially installed, often needs a restart to work immediately.
|
# Pulseaudio, if/when initially installed, often needs a restart to work immediately.
|
||||||
[ -f /usr/bin/pulseaudio ] && resetpulse
|
[ -f /usr/bin/pulseaudio ] && resetpulse
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue