2019-10-26 17:05:31 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
# to run this, execute
|
2019-11-02 17:09:01 +00:00
|
|
|
# bash <(curl -sL git.reekynet.com/ReekyMarko/dotfiles/raw/branch/master/deploy.sh)
|
2019-10-26 17:05:31 +00:00
|
|
|
|
|
|
|
# Run this to install my dotfiles on a fresh Arch Linux installation.
|
2019-11-02 17:09:01 +00:00
|
|
|
# This should work on any Arch Linux install with an internet connection
|
|
|
|
# and sudo rights
|
2019-10-26 17:05:31 +00:00
|
|
|
|
|
|
|
# When asked a hostname, make sure it's already in the dotrop config,
|
|
|
|
# otherwise dotdrop won't install anything
|
|
|
|
|
|
|
|
export DOTREPO="$HOME/Git/dotfiles"
|
2019-11-02 17:09:01 +00:00
|
|
|
export HOSTNAME="$(hostnamectl | head -n 1 | sed 's/ //g' | cut -d':' -f2-)"
|
|
|
|
export DISTRO="$(lsb_release -ds | sed 's/"//g')"
|
|
|
|
|
|
|
|
if [ "$DISTRO" -ne "Arch Linux" ]; then
|
|
|
|
print "Not running on Arch Linux"
|
|
|
|
print "Other distros not supported, exiting..."
|
|
|
|
exit 1
|
|
|
|
fi
|
2019-10-26 17:05:31 +00:00
|
|
|
|
2019-11-02 17:09:01 +00:00
|
|
|
read -p "Hostname [$HOSTNAME]: " -i $HOSTNAME NEWHOSTNAME
|
|
|
|
if [ "$HOSTNAME -ne $NEWHOSTNAME" ]; then
|
|
|
|
sudo hostnamectl set-hostname $NEWHOSTNAME
|
|
|
|
fi
|
|
|
|
HOSTNAME=$NEWHOSTNAME
|
2019-10-26 17:05:31 +00:00
|
|
|
|
|
|
|
# install yay
|
2019-11-02 17:09:01 +00:00
|
|
|
if ! [ -x "$(command -v yay)" ]; then
|
|
|
|
read -p "Install yay? [Y/n] " -i "y" IYAY
|
|
|
|
if [ "$(tr '[:upper:]' ':lower:' $IYAY)" -eq "y" ]; then
|
|
|
|
print "Installing yay"
|
|
|
|
fi
|
|
|
|
sudo pacman -Syu --needed --noconfirm git wget base-devel
|
|
|
|
cd
|
|
|
|
wget https://aur.archlinux.org/cgit/aur.git/snapshot/yay.tar.gz
|
|
|
|
tar xfv yay.tar.gz
|
2019-11-02 17:19:41 +00:00
|
|
|
cd yay
|
2019-11-02 17:09:01 +00:00
|
|
|
makepkg -si --noconfirm
|
|
|
|
cd ..
|
2019-11-02 17:19:41 +00:00
|
|
|
rm -r yay*
|
2019-11-02 17:09:01 +00:00
|
|
|
fi
|
2019-10-26 17:05:31 +00:00
|
|
|
|
|
|
|
mkdir ~/Git
|
2019-11-02 17:09:01 +00:00
|
|
|
git clone https://git.reekynet.com/ReekyMarko/dotfiles.git $DOTREPO
|
2019-10-26 17:05:31 +00:00
|
|
|
cd ~/Git/dotfiles
|
|
|
|
git submodule init
|
|
|
|
git submodule update
|
2019-11-02 17:09:01 +00:00
|
|
|
$DOTREPO/dotdrop.sh --cfg=$DOTREPO/config-home.yaml install
|
2019-10-26 17:05:31 +00:00
|
|
|
chsh -s /bin/zsh
|
2019-11-02 17:09:01 +00:00
|
|
|
zsh -c "source ~/.zshrc; sdotdrop install"
|