Initial commit

This commit is contained in:
2018-10-18 12:33:31 +08:00
commit e3bcaeaaf2
9 changed files with 338 additions and 0 deletions

20
install.sh Executable file
View File

@@ -0,0 +1,20 @@
#!/bin/bash
APP_DIR="$(dirname "$0")"
cd "$APP_DIR"
APP_DIR="$(pwd)"
SKEL_DIR="$APP_DIR/skel"
BACK_DIR="$APP_DIR/backup"
echo "Backing up original profile under $BACK_DIR"
mkdir -pv "$BACK_DIR"
cd "$SKEL_DIR"
OLDIFS="$IFS"
IFS=$'\n'
for x in $(ls -a); do
[ "$x" = '.' ] || [ "$x" = '..' ] && continue;
[ -r "$HOME/$x" ] && mv -v "$HOME/$x" "$BACK_DIR"
ln -srv "$(pwd)/$x" "$HOME"
done
IFS="$OLDIFS"