diff options
author | kaotisk <kaotisk@arching-kaos.com> | 2021-12-14 03:50:02 +0200 |
---|---|---|
committer | kaotisk <kaotisk@arching-kaos.com> | 2021-12-14 03:50:02 +0200 |
commit | 03a0fd66bd696a5cbf9cd91dde242df60e4a6f96 (patch) | |
tree | fc1100ce3736f536ab1c7a0a0927c18bd0d2ae07 /install.sh | |
parent | e93bc58da017610d6f92d68b40f908d09d529d53 (diff) | |
download | arching-kaos-tools-03a0fd66bd696a5cbf9cd91dde242df60e4a6f96.tar.gz arching-kaos-tools-03a0fd66bd696a5cbf9cd91dde242df60e4a6f96.tar.bz2 arching-kaos-tools-03a0fd66bd696a5cbf9cd91dde242df60e4a6f96.zip |
As far as I 've been
Diffstat (limited to 'install.sh')
-rwxr-xr-x | install.sh | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/install.sh b/install.sh new file mode 100755 index 0000000..e2102b7 --- /dev/null +++ b/install.sh @@ -0,0 +1,37 @@ +#!/bin/bash +logthis(){ + logger -t arching-kaos $1 +} +HAK=".arching-kaos" +logthis "Searching for $HAK folder and files" +if [ ! -d $HOME/$HAK ]; then + mkdir $HOME/$HAK + logthis "$HAK created in $HOME"; +fi +logthis "Searching for rc" +if [ ! -f $HOME/$HAK/rc ]; then + echo export PATH=$PATH:$HOME/$HAK/bin > $HOME/$HAK/rc + cat config.sh >> $HOME/$HAK/rc + logthis "New rc export to file"; +fi +logthis "Searching for shell" +if [ $SHELL == "/usr/bin/zsh" ]; then + SHELLRC=".zshrc" + logthis "ZSH found"; +elif [ $SHELL == "/usr/bin/bash" ]; then + SHELLRC='.bashrc' + logthis "BASH found"; +else + logthis "Unknown shell... skipping installation" + exit; +fi +logthis "Searching if rc is already there" +grep "source ~/$HAK/rc" $HOME/$SHELLRC > /dev/null 2>&1 +if [ $? == 0 ]; then + logthis "Already installed"; +else + echo "source ~/$HAK/rc" >> $HOME/$SHELLRC + logthis "$HAK installed at $HOME and sourced it in $SHELLRC"; +fi +sh init.sh +sh ipfs-check-install-setup-init-update |