diff options
| author | David T. Sadler <davidtsadler@googlemail.com> | 2020-06-12 16:39:56 +0100 |
|---|---|---|
| committer | David T. Sadler <davidtsadler@googlemail.com> | 2020-06-12 16:39:56 +0100 |
| commit | daa735a9e7e9482ca4b5d213fc2fbfba0c115f87 (patch) | |
| tree | 8da1d0fc193a28be43de3d90a409c2b5d5f3fe71 | |
| parent | df3407c9403fd7e68301008f80ce57e8550ed1d5 (diff) | |
Replace $HOME with full path to user's home directory as $HOME expands
to /root
| -rw-r--r-- | gohan.sh | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -72,8 +72,8 @@ install_dotfiles() { dialog --infobox "Downloading and installing dotfiles..." 4 60 [ ! -d "$2" ] && mkdir -p "$2" && chown -R "$name":"$name" "$2" sudo -u "$name" git clone --bare --depth 1 "$1" "$2" >/dev/null 2>&1 - sudo -u "$name" git --git-dir="$2" --work-tree=$HOME checkout - sudo -u "$name" git --git-dir="$2" --work-tree=$HOME config --local status.showUntrackedFiles no + sudo -u "$name" git --git-dir="$2" --work-tree="/home/$name" checkout + sudo -u "$name" git --git-dir="$2" --work-tree="/home/$name" config --local status.showUntrackedFiles no } install_software() { @@ -118,7 +118,7 @@ preinstall_msg || error "User exited." add_user || error "Error adding username and/or password." -install_dotfiles $dotfilesrepo "/home/$name/.local/src" +install_dotfiles $dotfilesrepo "/home/$name/.local/src/dotfiles" install_software |
