Update setup_scripts

This commit is contained in:
Tanveer Ahmed Ansari
2023-10-14 18:19:09 +05:30
committed by GitHub
parent af98433f17
commit 61eb559d6c

View File

@@ -5,18 +5,15 @@ die() {
exit 1 exit 1
} }
trap "exit 1" INT HUP trap "exit 1" INT HUP
#check your os #check your os
case $(uname -o) in case $(uname -o) in
*ndroid*) #termux *ndroid*) #termux
install_dir="$HOME" install_dir="$HOME/.shortcuts"
pkg_mgr="pkg in -y" pkg_mgr="pkg in -y"
pkg_upd="pkg up -y" pkg_upd="pkg up -y"
pkg_spec="openssl-tool" pkg_spec="openssl-tool"
cd ..
rm -rdf "$HOME"
gh_user="https://github.com/" gh_user="https://github.com/"
;; ;;
*) #arch linux *) #arch linux
@@ -28,15 +25,15 @@ case $(uname -o) in
;; ;;
esac esac
#updating system
$pkg_upd
#installing git #installing git
$pkg_mgr git $pkg_mgr git
#cloning repo #cloning repo
git clone ${gh_user}coolnsx/repos_scripts $install_dir git clone ${gh_user}coolnsx/repos_scripts $install_dir
#updating system
$pkg_upd
#installing common pkgs #installing common pkgs
$pkg_mgr aria2 fzf ffmpeg python python-pip ncurses starship $pkg_mgr aria2 fzf ffmpeg python python-pip ncurses starship
@@ -44,12 +41,8 @@ $pkg_mgr aria2 fzf ffmpeg python python-pip ncurses starship
$pkg_mgr $pkg_spec $pkg_mgr $pkg_spec
if [ -n "$install_dir" ]; then if [ -n "$install_dir" ]; then
cd "$install_dir" || exit 1 [ -d "$HOME/.config" ] || mkdir "$HOME/.config"
mkdir ".shortcuts" git clone "https://github.com/zsh-users/zsh-syntax-highlighting" "$HOME/.config/zsh-syntax"
cp * .shortcuts curl -s "https://raw.githubusercontent.com/CoolnsX/hyprdots/master/zsh/zshrc" | sed '$d' > $HOME/.zshrc
touch .hushlogin printf 'source $HOME/.config/zsh-syntax/zsh-syntax-highlighting.zsh' >> $HOME/.zshrc
mkdir ".config"
git clone "https://github.com/zsh-users/zsh-syntax-highlighting" "$install_dir/.config/zsh-syntax"
curl -s "https://raw.githubusercontent.com/CoolnsX/hyprdots/master/.zshrc" | sed '$d' > $install_dir/.zshrc
printf 'source $HOME/.config/zsh-syntax/zsh-syntax-highlighting.zsh' >> $install_dir/.zshrc
fi fi