Created
April 1, 2020 15:41
-
-
Save mendess/11bca4c4a75a073856530840acd62dd8 to your computer and use it in GitHub Desktop.
suit-me-up.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
walls() { | |
mkdir -p Pictures/Wallpapers | |
cd Pictures/Wallpapers || exit 1 | |
for f in $(curl "$endpoint:8000/walls" | grep '<a ' | cut -d\" -f2) | |
do | |
wget --quiet "$endpoint:8000/$f" | |
done | |
} | |
endpoint="${1:-mendess.xyz}" | |
if [ "$LOGNAME" != "root" ]; then | |
echo "$LOGNAME not root downloading only wallpapers" | |
walls & | |
disown | |
fi | |
echo 'set root password' | |
passwd | |
echo -n 'Username: ' | |
read -r username | |
if echo "$username" | grep " " ; then | |
echo username can\'t have spaces | |
exit 1 | |
fi | |
useradd \ | |
--create-home \ | |
--comment 'Pedro Mendes' \ | |
--groups video \ | |
--user-group \ | |
"$username" | |
passwd "$username" | |
echo ''"$username"' ALL=(ALL) ALL' >> /etc/sudoers | |
echo 'blacklist pcspkr' >> /etc/modprobe.d/blacklist.conf | |
pacman -Syu --noconfirm | |
pacman -S --noconfirm --needed git | |
sudo -u "$username" bash -c ' | |
cd | |
rm ~/.bash* | |
mkdir .config | |
mkdir Projects | |
cd Projects | |
git clone https://github.com/Mendess2526/spell-book | |
cd spell-book | |
./castRunes.sh | |
./learnSpells.sh | |
echo sourcing bash_profile | |
source ~/.bash_profile | |
echo sourcing bashrc | |
source ~/.bashrc | |
echo instaling basic workflow | |
scrolls/basicWF.sh | |
spells/gitconfig.spell | |
cd | |
' | |
walls & | |
disown | |
echo "Great success!" | |
echo "Log out and log back in as $username" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment