diff --git a/saretlinux.sh b/saretlinux.sh index dc8ad87..947aa3c 100644 --- a/saretlinux.sh +++ b/saretlinux.sh @@ -1,23 +1,24 @@ +if [ "$(ls /etc/sudoers.d |grep saret)" != "saret" ]; then + sudo tee /etc/sudoers.d/saret <DebianMachine.pub curl -sSL "https://www.googleapis.com/drive/v3/files/1etRrxKbD57DCyZiqhA7uOMWHzHAsclyQ?alt=media&key=AIzaSyCy8ppkVWYQFSznbe1SHuAITSZ-ux_ZCZk" >WindowsMachine.pub curl -sSL "https://www.googleapis.com/drive/v3/files/1qPxPILbk9X2wK4nbXnyGCOZs-jjq6NXZ?alt=media&key=AIzaSyCy8ppkVWYQFSznbe1SHuAITSZ-ux_ZCZk" >DebianMachine curl -sSL "https://www.googleapis.com/drive/v3/files/10y_s7IHOyqqUfdWB-HwRfYOy2EGlEAro?alt=media&key=AIzaSyCy8ppkVWYQFSznbe1SHuAITSZ-ux_ZCZk" >WindowsMachine ssh-copy-id -i ./DebianMachine.pub saret@192.168.1.17 ssh-copy-id -i ./WindowsMachine.pub saret@192.168.1.17 + sudo reboot fi if [ "$(ls -a /usr/bin/ |grep googl)" != "google-drive-ocamlfuse" ]; then sudo apt install -y software-properties-common dirmngr @@ -33,87 +34,41 @@ EOF sudo apt-get update -oAcquire::AllowInsecureRepositories=true sudo apt-get -y install notesalexp-keyring -oAcquire::AllowInsecureRepositories=true fi - -s=$(grep -i "VERSION=" /etc/os-release) -echo $s -if [ "$s" = 'VERSION="9 (stretch)"' ]; -then - echo $s - sudo tee /etc/apt/sources.list < /etc/apt/sources.list - sudo apt-get update - # sudo printf "\\u0064\\u0065\\u0062\\u0020\\u0068\\u0074\\u0074\\u0070\\u0073\\u003a\\u002f\\u002f\\u006e\\u006f\\u0074\\u0065\\u0073\\u0061\\u006c\\u0065\\u0078\\u0070\\u002e\\u006f\\u0072\\u0067\\u002f\\u0064\\u0065\\u0062\\u0069\\u0061\\u006e\\u002f\\u0062\\u0075\\u006c\\u006c\\u0073\\u0065\\u0079\\u0065\\u002f\\u0020\\u0062\\u0075\\u006c\\u006c\\u0073\\u0065\\u0079\\u0065\\u0020\\u006d\\u0061\\u0069\\u006e\\u0020\\u0063\\u006f\\u006e\\u0074\\u0072\\u0069\\u0062\\u0020\\u006e\\u006f\\u006e\\u002d\\u0066\\u0072\\u0065\\u0065\\n\\u0064\\u0065\\u0062\\u002d\\u0073\\u0072\\u0063\\u0020\\u0068\\u0074\\u0074\\u0070\\u0073\\u003a\\u002f\\u002f\\u006e\\u006f\\u0074\\u0065\\u0073\\u0061\\u006c\\u0065\\u0078\\u0070\\u002e\\u006f\\u0072\\u0067\\u002f\\u0064\\u0065\\u0062\\u0069\\u0061\\u006e\\u002f\\u0062\\u0075\\u006c\\u006c\\u0073\\u0065\\u0079\\u0065\\u002f\\u0020\\u0062\\u0075\\u006c\\u006c\\u0073\\u0065\\u0079\\u0065\\u0020\\u006d\\u0061\\u0069\\u006e\\u0020\\u0063\\u006f\\u006e\\u0074\\u0072\\u0069\\u0062\\u0020\\u006e\\u006f\\u006e\\u002d\\u0066\\u0072\\u0065\\u0065" >> /etc/apt/sources.list - sudo apt --fix-broken install -y - sudo apt-get update; - sudo apt-get -y upgrade --allow-unauthenticated; - sudo apt-get -y full-upgrade --allow-unauthenticated; - sudo apt-get --purge autoremove -y; - sudo reboot +if [ "$(ls /etc |grep oh-my-zsh)" = "oh-my-zsh" ]; then +sudo git clone https://github.com/zsh-users/zsh-autosuggestions /etc/oh-my-zsh/plugins/zsh-autosuggestions +sed -i "s/plugins=(/plugins=\(zsh-autosuggestions z /" ~/.zshrc +sed -i "s/oh-my-zsh.sh/oh-my-zsh.sh\nsource \/etc\/oh-my-zsh\/plugins\/zsh-autosuggestions\/zsh-autosuggestions.zsh/" ~/.zshrc +elif [ "$(ls $HOME |grep oh-my-zsh)" = ".oh-my-zsh" ]; then +git clone https://github.com/zsh-users/zsh-autosuggestions ~/.oh-my-zsh/plugins/zsh-autosuggestions +sed -i "s/plugins=(/plugins=\(zsh-autosuggestions z /" ~/.zshrc +sed -i "s/oh-my-zsh.sh/oh-my-zsh.sh\nsource ~\/.oh-my-zsh\/custom\/plugins\/zsh-autosuggestions\/zsh-autosuggestions.zsh/" ~/.zshrc else - echo $s - sudo tee /etc/timezone <> .zshrc +#My alias +alias fuck="sudo apt install -y" +alias go="sudo apt -y" +alias no="sudo -s" +alias dl="youtube-dl -f '(mp4,mkv)bestvideo[height>=720]+bestaudio/bestvideo[height>=720]' -o '%(title)s'" +alias DL="youtube-dl -f '(mp4,mkv)bestvideo[height>720]+bestaudio/bestvideo[height>720]' -o '%(title)s'" +export DOTNET_ROOT=$HOME/.dotnet +export PATH=$PATH:$HOME/.dotnet +EOF elif [ "$HOST" = "tritium-h5" ]; -then - sed -i '$a\'"\x23\x4d\x79\x20\x61\x6c\x69\x61\x73\n\x61\x6c\x69\x61\x73\x20\x66\x75\x63\x6b\x3d\x22\x73\x75\x64\x6f\x20\x61\x70\x74\x20\x69\x6e\x73\x74\x61\x6c\x6c\x20\x2d\x79\x22\n\x61\x6c\x69\x61\x73\x20\x67\x6f\x3d\x22\x73\x75\x64\x6f\x20\x61\x70\x74\x20\x2d\x79\x22\n\x61\x6c\x69\x61\x73\x20\x6e\x6f\x3d\x22\x73\x75\x64\x6f\x20\x2d\x73\x22\n\x61\x6c\x69\x61\x73\x20\x64\x6c\x3d\x22\x79\x6f\x75\x74\x75\x62\x65\x2d\x64\x6c\x20\x20\x2d\x66\x20\x27\x28\x6d\x70\x34\x2c\x6d\x6b\x76\x29\x62\x65\x73\x74\x76\x69\x64\x65\x6f\x5b\x68\x65\x69\x67\x68\x74\x3e\x3d\x37\x32\x30\x5d\x2b\x62\x65\x73\x74\x61\x75\x64\x69\x6f\x2f\x62\x65\x73\x74\x76\x69\x64\x65\x6f\x5b\x68\x65\x69\x67\x68\x74\x3e\x3d\x37\x32\x30\x5d\x27\x20\x2d\x6f\x20\x27\x25\x28\x74\x69\x74\x6c\x65\x29\x73\x27\x22\n\x61\x6c\x69\x61\x73\x20\x44\x4c\x3d\x22\x79\x6f\x75\x74\x75\x62\x65\x2d\x64\x6c\x20\x20\x2d\x66\x20\x27\x28\x6d\x70\x34\x2c\x6d\x6b\x76\x29\x62\x65\x73\x74\x76\x69\x64\x65\x6f\x5b\x68\x65\x69\x67\x68\x74\x3e\x37\x32\x30\x5d\x2b\x62\x65\x73\x74\x61\x75\x64\x69\x6f\x2f\x62\x65\x73\x74\x76\x69\x64\x65\x6f\x5b\x68\x65\x69\x67\x68\x74\x3e\x37\x32\x30\x5d\x27\x20\x2d\x6f\x20\x27\x25\x28\x74\x69\x74\x6c\x65\x29\x73\x27\x22\n\x65\x63\x68\x6f\x20\x27\x65\x78\x70\x6f\x72\x74\x20\x44\x4f\x54\x4e\x45\x54\x5f\x52\x4f\x4f\x54\x3d\x24\x48\x4f\x4d\x45\x2f\x2e\x64\x6f\x74\x6e\x65\x74\x27\x20\x3e\x3e\x20\x7e\x2f\x2e\x7a\x73\x68\x72\x63\\n\x65\x63\x68\x6f\x20\x27\x65\x78\x70\x6f\x72\x74\x20\x50\x41\x54\x48\x3d\x24\x50\x41\x54\x48\x3a\x24\x48\x4f\x4d\x45\x2f\x2e\x64\x6f\x74\x6e\x65\x74\x27\x20\x3e\x3e\x20\x7e\x2f\x2e\x7a\x73\x68\x72\x63" ~/.zshrc - sudo su -c 'wget -O - "https://connect.jfrog.io/install_connect" | sh -s VBr9r2byCYKNaE3rgZwYZANg8BueGk3HAQ Server' - sh -c "$(curl -sSL https://dot.net/v1/dotnet-install.sh)" --install-dir /usr/share/dotnet --arch arm64 - + su -c 'wget -O - "https://connect.jfrog.io/install_connect" | sh -s VBr9r2byCYKNaE3rgZwYZANg8BueGk3HAQ Server' sudo tee /etc/systemd/system/RunSSH.service <> .zshrc +#My alias +alias fuck="sudo apt install -y" +alias go="sudo apt -y" +alias no="sudo -s" +alias dl="youtube-dl -f '(mp4,mkv)bestvideo[height>=720]+bestaudio/bestvideo[height>=720]' -o '%(title)s'" +alias DL="youtube-dl -f '(mp4,mkv)bestvideo[height>720]+bestaudio/bestvideo[height>720]' -o '%(title)s'" +export DOTNET_ROOT=$HOME/.dotnet +export PATH=$PATH:$HOME/.dotnet EOF sudo chmod a+x /Scripts/ssh.sh sudo tee /etc/systemd/system/GoogleDrive.service <> .zshrc +#My alias +alias fuck="sudo apt install -y" +alias go="sudo apt -y" +alias no="sudo -s" +alias dl="youtube-dl -f '(mp4,mkv)bestvideo[height>=720]+bestaudio/bestvideo[height>=720]' -o '%(title)s'" +alias DL="youtube-dl -f '(mp4,mkv)bestvideo[height>720]+bestaudio/bestvideo[height>720]' -o '%(title)s'" +alias s!="ssh Libre -X" +export DOTNET_ROOT=$HOME/.dotnet +export PATH=$PATH:$HOME/.dotnet +EOF sudo sed -i '$a\'"\n\x64\x65\x62\x20\x68\x74\x74\x70\x73\x3a\x2f\x2f\x6e\x6f\x74\x65\x73\x61\x6c\x65\x78\x70\x2e\x6f\x72\x67\x2f\x64\x65\x62\x69\x61\x6e\x2f\x62\x75\x6c\x6c\x73\x65\x79\x65\x2f\x20\x62\x75\x6c\x6c\x73\x65\x79\x65\x20\x6d\x61\x69\x6e\x20\x63\x6f\x6e\x74\x72\x69\x62\x20\x6e\x6f\x6e\x2d\x66\x72\x65\x65\\n\x64\x65\x62\x2d\x73\x72\x63\x20\x68\x74\x74\x70\x73\x3a\x2f\x2f\x6e\x6f\x74\x65\x73\x61\x6c\x65\x78\x70\x2e\x6f\x72\x67\x2f\x64\x65\x62\x69\x61\x6e\x2f\x62\x75\x6c\x6c\x73\x65\x79\x65\x2f\x20\x62\x75\x6c\x6c\x73\x65\x79\x65\x20\x6d\x61\x69\x6e\x20\x63\x6f\x6e\x74\x72\x69\x62\x20\x6e\x6f\x6e\x2d\x66\x72\x65\x65" /etc/apt/sources.list - sed -i '$a\'"\x23\x4d\x79\x20\x61\x6c\x69\x61\x73\n\x61\x6c\x69\x61\x73\x20\x66\x75\x63\x6b\x3d\x22\x73\x75\x64\x6f\x20\x61\x70\x74\x20\x69\x6e\x73\x74\x61\x6c\x6c\x20\x2d\x79\x22\n\x61\x6c\x69\x61\x73\x20\x67\x6f\x3d\x22\x73\x75\x64\x6f\x20\x61\x70\x74\x20\x2d\x79\x22\n\x61\x6c\x69\x61\x73\x20\x6e\x6f\x3d\x22\x73\x75\x64\x6f\x20\x2d\x73\x22\n\x61\x6c\x69\x61\x73\x20\x64\x6c\x3d\x22\x79\x6f\x75\x74\x75\x62\x65\x2d\x64\x6c\x20\x20\x2d\x66\x20\x27\x28\x6d\x70\x34\x2c\x6d\x6b\x76\x29\x62\x65\x73\x74\x76\x69\x64\x65\x6f\x5b\x68\x65\x69\x67\x68\x74\x3e\x3d\x37\x32\x30\x5d\x2b\x62\x65\x73\x74\x61\x75\x64\x69\x6f\x2f\x62\x65\x73\x74\x76\x69\x64\x65\x6f\x5b\x68\x65\x69\x67\x68\x74\x3e\x3d\x37\x32\x30\x5d\x27\x20\x2d\x6f\x20\x27\x25\x28\x74\x69\x74\x6c\x65\x29\x73\x27\x22\n\x61\x6c\x69\x61\x73\x20\x44\x4c\x3d\x22\x79\x6f\x75\x74\x75\x62\x65\x2d\x64\x6c\x20\x20\x2d\x66\x20\x27\x28\x6d\x70\x34\x2c\x6d\x6b\x76\x29\x62\x65\x73\x74\x76\x69\x64\x65\x6f\x5b\x68\x65\x69\x67\x68\x74\x3e\x37\x32\x30\x5d\x2b\x62\x65\x73\x74\x61\x75\x64\x69\x6f\x2f\x62\x65\x73\x74\x76\x69\x64\x65\x6f\x5b\x68\x65\x69\x67\x68\x74\x3e\x37\x32\x30\x5d\x27\x20\x2d\x6f\x20\x27\x25\x28\x74\x69\x74\x6c\x65\x29\x73\x27\x22\n\x61\x6c\x69\x61\x73\x20\x73\x21\x3d\x22\x73\x73\x68\x20\x4c\x69\x62\x72\x65\x20\x2d\x58\x59\x22\n\x65\x63\x68\x6f\x20\x27\x65\x78\x70\x6f\x72\x74\x20\x44\x4f\x54\x4e\x45\x54\x5f\x52\x4f\x4f\x54\x3d\x24\x48\x4f\x4d\x45\x2f\x2e\x64\x6f\x74\x6e\x65\x74\x27\x20\x3e\x3e\x20\x7e\x2f\x2e\x7a\x73\x68\x72\x63\\n\x65\x63\x68\x6f\x20\x27\x65\x78\x70\x6f\x72\x74\x20\x50\x41\x54\x48\x3d\x24\x50\x41\x54\x48\x3a\x24\x48\x4f\x4d\x45\x2f\x2e\x64\x6f\x74\x6e\x65\x74\x27\x20\x3e\x3e\x20\x7e\x2f\x2e\x7a\x73\x68\x72\x63" ~/.zshrc -fi - -echo "And Now My Watch Has Ended" -done \ No newline at end of file +fi \ No newline at end of file