-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup_nonsudoer
executable file
·34 lines (27 loc) · 1.13 KB
/
setup_nonsudoer
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
#!/usr/bin/env bash
set -e
SETUP_CONFIGDIR=$(cd $(dirname -- $0);pwd)/non-sudoer
SETUP_ROOT_USER_CONFIGDIR=$(cd $(dirname -- $0);pwd)
if [ ! -e $HOME/.local/src ]; then
mkdir -p $HOME/.local/src
fi
if [ ! -e $HOME/tmp ]; then
mkdir -p $HOME/tmp
fi
if ! command -v percol &> /dev/null; then
echo "percol command not found. Installing..."
pip3 install --user percol
fi
if ! command -v xsel &> /dev/null; then
echo "xsel command not found. Installing..."
git clone --branch 1.2.1 --depth 1 https://github.com/kfish/xsel.git $HOME/.local/src/xsel
cd $HOME/.local/src/xsel && ./autogen.sh && ./configure --prefix=$HOME/.local && make -j$(nproc) install
fi
ln -sf $SETUP_CONFIGDIR/rc.bash $HOME/.bashrc
ln -sf $SETUP_CONFIGDIR/emacs.el $HOME/.emacs
ln -sf $SETUP_ROOT_USER_CONFIGDIR/roles/common/tmux/tmux.conf $HOME/.tmux.conf
mkdir -p $HOME/.config/git
ln -sf $SETUP_ROOT_USER_CONFIGDIR/roles/common/git/gitignore_global $HOME/.config/git/ignore
mkdir -p $HOME/.percol.d
ln -sf $SETUP_ROOT_USER_CONFIGDIR/roles/common/percol/rc.py $HOME/.percol.d/rc.py
ln -sf $SETUP_ROOT_USER_CONFIGDIR/roles/common/docker $HOME/.docker