Skip to content

Instantly share code, notes, and snippets.

@mendess
Created April 1, 2020 15:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mendess/11bca4c4a75a073856530840acd62dd8 to your computer and use it in GitHub Desktop.
Save mendess/11bca4c4a75a073856530840acd62dd8 to your computer and use it in GitHub Desktop.
suit-me-up.sh
#!/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