added many changes for every computer

This commit is contained in:
2022-06-21 14:14:14 +03:00
parent 53fc128212
commit 9248efd62c

View File

@@ -13,6 +13,16 @@ if [ "$(ls /etc/sudoers.d |grep saret)" != "saret" ]; then
saret ALL=(ALL) NOPASSWD:ALL
EOF
fi
if [ "$(ls -a /usr/bin/ |grep googl)" != "google-drive-ocamlfuse" ]; then
sudo apt install -y software-properties-common dirmngr
sudo tee /etc/apt/sources.list.d/alessandro-strada-ubuntu-ppa-bionic.list <<EOF
deb http://ppa.launchpad.net/alessandro-strada/ppa/ubuntu xenial main
deb-src http://ppa.launchpad.net/alessandro-strada/ppa/ubuntu xenial main
EOF
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys AD5F235DF639B041
sudo apt-get update
sudo apt-get install -y google-drive-ocamlfuse
fi
s=$(grep -i "VERSION=" /etc/os-release)
echo $s
if [ "$s" = 'VERSION="9 (stretch)"' ];
@@ -44,6 +54,7 @@ elif [ "$s" = 'VERSION="10 (buster)"' ];
then
echo $s
sudo rm /var/lib/dpkg/info/shim-signed:arm64.postrm
sudo apt --fix-broken install -y
sudo tee /etc/apt/sources.list << EOF
deb http://deb.debian.org/debian bullseye main contrib non-free
deb-src http://deb.debian.org/debian bullseye main contrib non-free
@@ -51,8 +62,6 @@ deb http://security.debian.org/debian-security bullseye-security main contrib no
deb-src http://security.debian.org/debian-security bullseye-security main contrib non-free
deb http://deb.debian.org/debian bullseye-updates main contrib non-free
deb-src http://deb.debian.org/debian bullseye-updates main contrib non-free
deb https://notesalexp.org/debian/bullseye/ bullseye main contrib non-free
deb-src https://notesalexp.org/debian/bullseye/ bullseye main contrib non-free
EOF
# sudo printf "\\u0064\\u0065\\u0062\\u0020\\u0068\\u0074\\u0074\\u0070\\u003a\\u002f\\u002f\\u0064\\u0065\\u0062\\u002e\\u0064\\u0065\\u0062\\u0069\\u0061\\u006e\\u002e\\u006f\\u0072\\u0067\\u002f\\u0064\\u0065\\u0062\\u0069\\u0061\\u006e\\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\\u003a\\u002f\\u002f\\u0064\\u0065\\u0062\\u002e\\u0064\\u0065\\u0062\\u0069\\u0061\\u006e\\u002e\\u006f\\u0072\\u0067\\u002f\\u0064\\u0065\\u0062\\u0069\\u0061\\u006e\\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\\u0020\\u0068\\u0074\\u0074\\u0070\\u003a\\u002f\\u002f\\u0073\\u0065\\u0063\\u0075\\u0072\\u0069\\u0074\\u0079\\u002e\\u0064\\u0065\\u0062\\u0069\\u0061\\u006e\\u002e\\u006f\\u0072\\u0067\\u002f\\u0064\\u0065\\u0062\\u0069\\u0061\\u006e\\u002d\\u0073\\u0065\\u0063\\u0075\\u0072\\u0069\\u0074\\u0079\\u0020\\u0062\\u0075\\u006c\\u006c\\u0073\\u0065\\u0079\\u0065\\u002d\\u0073\\u0065\\u0063\\u0075\\u0072\\u0069\\u0074\\u0079\\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\\u003a\\u002f\\u002f\\u0073\\u0065\\u0063\\u0075\\u0072\\u0069\\u0074\\u0079\\u002e\\u0064\\u0065\\u0062\\u0069\\u0061\\u006e\\u002e\\u006f\\u0072\\u0067\\u002f\\u0064\\u0065\\u0062\\u0069\\u0061\\u006e\\u002d\\u0073\\u0065\\u0063\\u0075\\u0072\\u0069\\u0074\\u0079\\u0020\\u0062\\u0075\\u006c\\u006c\\u0073\\u0065\\u0079\\u0065\\u002d\\u0073\\u0065\\u0063\\u0075\\u0072\\u0069\\u0074\\u0079\\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\\u0020\\u0068\\u0074\\u0074\\u0070\\u003a\\u002f\\u002f\\u0064\\u0065\\u0062\\u002e\\u0064\\u0065\\u0062\\u0069\\u0061\\u006e\\u002e\\u006f\\u0072\\u0067\\u002f\\u0064\\u0065\\u0062\\u0069\\u0061\\u006e\\u0020\\u0062\\u0075\\u006c\\u006c\\u0073\\u0065\\u0079\\u0065\\u002d\\u0075\\u0070\\u0064\\u0061\\u0074\\u0065\\u0073\\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\\u003a\\u002f\\u002f\\u0064\\u0065\\u0062\\u002e\\u0064\\u0065\\u0062\\u0069\\u0061\\u006e\\u002e\\u006f\\u0072\\u0067\\u002f\\u0064\\u0065\\u0062\\u0069\\u0061\\u006e\\u0020\\u0062\\u0075\\u006c\\u006c\\u0073\\u0065\\u0079\\u0065\\u002d\\u0075\\u0070\\u0064\\u0061\\u0074\\u0065\\u0073\\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
curl -s https://notesalexp.org/debian/alexp_key.asc | sudo gpg --no-default-keyring --keyring gnupg-ring:/etc/apt/trusted.gpg.d/alexp_key.gpg --import
@@ -75,30 +84,35 @@ EOF
sudo dpkg-reconfigure -f noninteractive tzdata
sudo rm /var/lib/dpkg/info/shim-signed:arm64.postrm
sudo apt --fix-broken install -y
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
sed -i "s/plugins=\(git\)/plugins=\(git\n\tz\n\tzsh-autosuggestions\n\)/g"
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" CHSH='yes' --unattended CHSH='yes'
sudo chsh -s $(which zsh) $(whoami)
git clone https://github.com/zsh-users/zsh-autosuggestions ~/.oh-my-zsh/plugins/zsh-autosuggestions
sed -i "s/plugins=(git)/plugins=\(git\n\tz\n\tzsh-autosuggestions\n\)/g"
#sed "s/#My alias\nalias fuck="sudo apt install -y"\nalias go="sudo apt -y"\nalias no="sudo -s"\nalias dl="youtube-dl -f '(mp4,mkv)bestvideo[height>=720]+bestaudio/bestvideo[height>=720]' -o '%(title)s'"\nalias DL="youtube-dl -f '(mp4,mkv)bestvideo[height>720]+bestaudio/bestvideo[height>720]' -o '%(title)s'"\nalias s!="ssh Libre -XY""
printf "\\u0023\\u004d\\u0079\\u0020\\u0061\\u006c\\u0069\\u0061\\u0073\\n\\u0061\\u006c\\u0069\\u0061\\u0073\\u0020\\u0066\\u0075\\u0063\\u006b\\u003d\\u0022\\u0073\\u0075\\u0064\\u006f\\u0020\\u0061\\u0070\\u0074\\u0020\\u0069\\u006e\\u0073\\u0074\\u0061\\u006c\\u006c\\u0020\\u002d\\u0079\\u0022\\n\\u0061\\u006c\\u0069\\u0061\\u0073\\u0020\\u0067\\u006f\\u003d\\u0022\\u0073\\u0075\\u0064\\u006f\\u0020\\u0061\\u0070\\u0074\\u0020\\u002d\\u0079\\u0022\\n\\u0061\\u006c\\u0069\\u0061\\u0073\\u0020\\u006e\\u006f\\u003d\\u0022\\u0073\\u0075\\u0064\\u006f\\u0020\\u002d\\u0073\\u0022\\n\\u0061\\u006c\\u0069\\u0061\\u0073\\u0020\\u0064\\u006c\\u003d\\u0022\\u0079\\u006f\\u0075\\u0074\\u0075\\u0062\\u0065\\u002d\\u0064\\u006c\\u0020\\u0020\\u002d\\u0066\\u0020\\u0027\\u0028\\u006d\\u0070\\u0034\\u002c\\u006d\\u006b\\u0076\\u0029\\u0062\\u0065\\u0073\\u0074\\u0076\\u0069\\u0064\\u0065\\u006f\\u005b\\u0068\\u0065\\u0069\\u0067\\u0068\\u0074\\u003e\\u003d\\u0037\\u0032\\u0030\\u005d\\u002b\\u0062\\u0065\\u0073\\u0074\\u0061\\u0075\\u0064\\u0069\\u006f\\u002f\\u0062\\u0065\\u0073\\u0074\\u0076\\u0069\\u0064\\u0065\\u006f\\u005b\\u0068\\u0065\\u0069\\u0067\\u0068\\u0074\\u003e\\u003d\\u0037\\u0032\\u0030\\u005d\\u0027\\u0020\\u002d\\u006f\\u0020\\u0027\\u0025\\u0028\\u0074\\u0069\\u0074\\u006c\\u0065\\u0029\\u0073\\u0027\\u0022\\n\\u0061\\u006c\\u0069\\u0061\\u0073\\u0020\\u0044\\u004c\\u003d\\u0022\\u0079\\u006f\\u0075\\u0074\\u0075\\u0062\\u0065\\u002d\\u0064\\u006c\\u0020\\u0020\\u002d\\u0066\\u0020\\u0027\\u0028\\u006d\\u0070\\u0034\\u002c\\u006d\\u006b\\u0076\\u0029\\u0062\\u0065\\u0073\\u0074\\u0076\\u0069\\u0064\\u0065\\u006f\\u005b\\u0068\\u0065\\u0069\\u0067\\u0068\\u0074\\u003e\\u0037\\u0032\\u0030\\u005d\\u002b\\u0062\\u0065\\u0073\\u0074\\u0061\\u0075\\u0064\\u0069\\u006f\\u002f\\u0062\\u0065\\u0073\\u0074\\u0076\\u0069\\u0064\\u0065\\u006f\\u005b\\u0068\\u0065\\u0069\\u0067\\u0068\\u0074\\u003e\\u0037\\u0032\\u0030\\u005d\\u0027\\u0020\\u002d\\u006f\\u0020\\u0027\\u0025\\u0028\\u0074\\u0069\\u0074\\u006c\\u0065\\u0029\\u0073\\u0027\\u0022\\n\\u0061\\u006c\\u0069\\u0061\\u0073\\u0020\\u0073\\u0021\\u003d\\u0022\\u0073\\u0073\\u0068\\u0020\\u004c\\u0069\\u0062\\u0072\\u0065\\u0020\\u002d\\u0058\\u0059\\u0022" >> ~/.zshrc
source ~/.zshrc
git clone https://github.com/zsh-users/zsh-autosuggestions ~/.oh-my-zsh/plugins/zsh-autosuggestions
# source ~/.zshrc
sudo apt -y update
sudo apt -y full-upgrade --allow-unauthenticated
# bash <curl -sSL https://gist.github.com/hannesbe/6c110e9de6644f07a48eecfdbe6b728d/raw
sh -c <"$(curl -sSL https://gist.github.com/hannesbe/6c110e9de6644f07a48eecfdbe6b728d/raw)"
sudo tee /etc/apt/sources.list.d/notaesalexp.list<<EOF
deb https://notesalexp.org/tesseract-ocr5/$(lsb_release -cs)/ $(lsb_release -cs) main
EOF
sudo apt -y update
sudo apt install -y $(apt-cache search tesseract-ocr | awk '{print $1}')
sudo apt -y install ocrmypdf python3-pip jbig2enc jbig2dec imagemagick
sudo apt -y install ocrmypdf
sudo apt -y install python3-pip
sudo apt -y install jbig2enc
sudo apt -y install jbig2dec
sudo apt -y install imagemagick
sudo mkdir /usr/share/tesseract-ocr/5/tessdata
wget https://raw.githubusercontent.com/tesseract-ocr/tessdata/main/deu_frak.traineddata -O /usr/share/tesseract-ocr/5/tessdata/
sh -c <"$(curl -sSL https://dot.net/v1/dotnet-install.sh)"
# sh -c <"$(curl -sSL https://dot.net/v1/dotnet-install.sh)"
fi
if [ "$HOST" = "libre-computer" ];
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" ~/.zshrc
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/ --arch arm64
sudo tee /etc/systemd/system/RunSSH.service <<EOF
[Unit]
Description=Run This SSH in ssh-j server
@@ -111,10 +125,12 @@ ExecStart=sh /Scripts/ssh.sh
[Install]
WantedBy=multi-user.target
EOF
sudo chmod a+x /etc/systemd/system/RunSSH.service
sudo mkdir /Scripts
sudo tee /Scripts/ssh.sh <<EOF
ssh saret@ssh-j.com -N -R libre-computer:22:localhost:22
EOF
sudo chmod a+x /Scripts/ssh.sh
sudo tee /etc/systemd/system/GoogleDrive.service <<EOF
[Unit]
Description=Run Google drive folder, and mount it.
@@ -128,9 +144,13 @@ User=saret
[Install]
WantedBy=multi-user.target
EOF
sudo chmod a+x /etc/systemd/system/GoogleDrive.service
sudo systemctl enable GoogleDrive
sudo systemctl enable RunSSH
else
sh -c <"$(curl -sSL https://dot.net/v1/dotnet-install.sh)" --install-dir /usr/share/ --arch x64
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" ~/.zshrc
fi
echo "and now my watch has ended"
done