solbuilds/setup-solus.sh

68 lines
2.2 KiB
Bash
Raw Normal View History

2018-01-29 21:01:53 +01:00
#!/bin/bash
2018-02-02 16:23:36 +01:00
if [[ $EUID -ne 0 ]] || [ -z ${SUDO_USER+x} ]; then
echo "This script must be run as sudo under your main user" 1>&2
exit 1
fi
2018-01-30 10:48:40 +01:00
cd
2018-01-29 21:01:53 +01:00
2018-02-02 16:23:36 +01:00
eopkg up -y
2018-01-29 21:01:53 +01:00
2018-02-02 16:23:36 +01:00
snap install spotify
eopkg it -c system.devel -y
eopkg it xrdb zsh git git-lfs telegram htop etcher golang zip unzip cava neofetch aria2 acpi ncmpcpp rxvt-unicode vim epson-inkjet-printer-escpr flatpak texlive-all solbuild pip discord -y
2018-01-29 21:01:53 +01:00
2018-02-02 16:23:36 +01:00
sudo -u $SUDO_USER git lfs install
2018-01-30 09:41:42 +01:00
2018-01-30 21:24:15 +01:00
eopkg lr | grep solbuilds -q
if [[ $? -ne 1 ]]; then
2018-02-02 16:23:36 +01:00
eopkg rr solbuilds
2018-01-30 21:24:15 +01:00
fi
2018-02-02 16:23:36 +01:00
eopkg ar solus.sh https://repo.solus.sh/eopkg-index.xml.xz
eopkg er solus.sh
eopkg it chrome cli-visualizer dotnet-sdk geogebra insync jetbrains-toolbox libspotify libspotify-devel sublime-text-dev xarchiver -y
2018-01-30 10:48:40 +01:00
2018-02-01 20:36:15 +01:00
if [[ ! -f "/usr/bin/vis-real" ]]; then
2018-02-02 16:23:36 +01:00
mv /usr/bin/vis /usr/bin/vis-real
echo '#!/bin/bash' > /usr/bin/vis
echo 'xrdb -load ~/.Xresources' >> /usr/bin/vis
echo 'bash -c "urxvt -e ~/.vis.sh" &' >> /usr/bin/vis
2018-02-01 20:36:15 +01:00
fi
2018-01-29 21:01:53 +01:00
if [[ $? == 1 ]]; then
2018-02-02 16:23:36 +01:00
solbuild init
solbuild update
else
solbuild update
2018-01-29 21:01:53 +01:00
fi
2018-02-02 16:23:36 +01:00
pip install mopidy mopidy-spotify mopidy-spotify-web mopidy-iris
2018-01-29 21:01:53 +01:00
2018-02-02 16:23:36 +01:00
sudo -u $SUDO_USER flatpak install --user --from https://download.mono-project.com/repo/monodevelop.flatpakref -y
2018-01-29 21:01:53 +01:00
2018-02-02 16:23:36 +01:00
if [[ ! -f /home/$SUDO_USER/".dotfiles_installed" ]]; then
wget https://solus.sh/dotfiles.zip -O /tmp/dotfiles.zip
2018-02-02 16:23:36 +01:00
unzip -o /tmp/dotfiles.zip -d /home/$SUDO_USER/
touch /home/$SUDO_USER/".dotfiles_installed"
fi
2018-01-29 21:01:53 +01:00
2018-02-02 16:23:36 +01:00
sudo -u $SUDO_USER bash -c "$(curl -fsSL solus.sh/solus-ohmyz.sh)"
2018-01-29 21:01:53 +01:00
2018-02-02 16:23:36 +01:00
cat /home/$SUDO_USER/.zshrc | grep transfer.sh -q
2018-01-29 21:01:53 +01:00
if [[ $? -ne 0 ]]; then
2018-02-02 16:23:36 +01:00
curl -fsSL https://gist.githubusercontent.com/anonymous/c2a9e0ea86b5fb9c7971182f461e33e4/raw/567a15b8491cb9106c53835c731e583d3b12d7b5/gistfile1.txt >> /home/$SUDO_USER/.zshrc
2018-01-29 21:01:53 +01:00
fi
2018-01-30 16:55:51 +01:00
2018-02-02 16:23:36 +01:00
cat /home/$SUDO_USER/.zshrc | grep "alias gst=" -q
2018-01-30 16:55:51 +01:00
if [[ $? -ne 0 ]]; then
printf "\n" >> .zshrc
2018-02-02 16:23:36 +01:00
echo "alias gst='git status'" >> /home/$SUDO_USER/.zshrc
echo "alias gad='git add'" >> /home/$SUDO_USER/.zshrc
echo "alias gcm='git commit'" >> /home/$SUDO_USER/.zshrc
echo "alias gcmm='git commit -m'" >> /home/$SUDO_USER/.zshrc
echo "alias gps='git push'" >> /home/$SUDO_USER/.zshrc
echo "alias gpl='git pull'" >> /home/$SUDO_USER/.zshrc
echo "alias grm='git rm'" >> /home/$SUDO_USER/.zshrc
2018-01-30 16:55:51 +01:00
fi