diff options
| author | David T. Sadler <davidtsadler@googlemail.com> | 2020-06-11 21:31:59 +0100 |
|---|---|---|
| committer | David T. Sadler <davidtsadler@googlemail.com> | 2020-06-11 21:31:59 +0100 |
| commit | e52c152b4f1830c659e59d79788f32727a360655 (patch) | |
| tree | 4b5bad434844d2a3c1dcc55ea64d67c7cc75ff25 | |
| parent | 0562e731ab8781343058bae40b7f21a0cbda7c97 (diff) | |
Install GitHub software from GitHub repositories
| -rw-r--r-- | gohan.sh | 19 | ||||
| -rw-r--r-- | packages.csv | 7 |
2 files changed, 26 insertions, 0 deletions
@@ -102,6 +102,23 @@ install_packages() { done < /tmp/packages.csv } +install_github_repositories() { + [ ! -d "/home/$name/.local/src" ] && mkdir -p "/home/$name/.local/src" && chown -R "$name":"$name" /home/"$name/.local" + install_from_github git@github.com:davidtsadler/st.git + install_from_github git@github.com:davidtsadler/dwm.git + install_from_github git@github.com:davidtsadler/dmenu.git +} + +install_from_github() { + progname="$(basename "$1" .git)" + repodir="/home/$name/.local/src" + dir="$repodir/$progname" + dialog --title "GOHAN Installation" --infobox "Installing \`$progname\` via \`git\` and \`make\`." 5 70 + sudo -u "$name" git clone --depth 1 "$1" "$dir" >/dev/null 2>&1 + cd "$dir" || exit + sudo -u "$name" make clean install >/dev/null 2>&1 +} + ### THE ACTUAL SCRIPT ### install_package dialog || error "Are you sure you're running this as the root user and have an internet connection?" @@ -121,4 +138,6 @@ save_github_ssh_keys || error "Error saving the GitHub SSH keys." install_packages +install_github_repositories + clear diff --git a/packages.csv b/packages.csv index 5a49a96..1c25966 100644 --- a/packages.csv +++ b/packages.csv @@ -1,2 +1,9 @@ #Name, Description +base-devel,is needed to compile software git,is needed to install software from git repositories +libx11,is required to compile some software +libxft,is required to compile some software +sudo,allows root to install software as a different user +terminus-font,is a monospace font that can be used in st. +xorg-server,is the display server +xorg-xinit,will allow us to start the display server |
