-
Notifications
You must be signed in to change notification settings - Fork 3
/
configure.sh
executable file
·36 lines (30 loc) · 1.04 KB
/
configure.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/usr/bin/env bash
# Loads configurations into their proper places
if [ ! -d "./configs" ] ; then
echo "Could not find configs. This script must be run in the root sneaky-scripts directory."
exit 1
fi
cat ./configs/bash_aliases >> ~/.bash_aliases
cat ./configs/bash_profile >> ~/.bash_profile
cat ./configs/profile >> ~/.profile
cat ./configs/bashrc >> ~/.bashrc
cat ./configs/ssh_config >> ~/.ssh/config
chmod 644 ~/.ssh/config
if [ -f ~/.gitconfig ]; then
sudo chown "$USER":"$USER" ~/.gitconfig
fi
cat ./configs/gitconfig >> ~/.gitconfig
if [ $WSL ] ; then
echo "Installing SSH key for WSL..."
if [ -d "/mnt/c" ] ; then
WINHOME="/mnt/c/Users/${WINUSER}"
elif [ -d "/c" ] ; then
WINHOME="/c/Users/${WINUSER}"
fi
cat ./configs/ssh_config >> "${WINHOME}/.ssh/config"
chmod 644 "${WINHOME}/.ssh/config"
fi
if [ $DEBIAN ] && [ ! $WSL ] ; then
echo "Attempting to disable lock screen... (Failures are ignored)"
gsettings set org.gnome.desktop.lockdown disable-lock-screen 'true' 2> /dev/null || true
fi