-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsync.sh
More file actions
34 lines (28 loc) · 703 Bytes
/
sync.sh
File metadata and controls
34 lines (28 loc) · 703 Bytes
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
#
# Simply switch to <this repo> root directory and run:
#
# $ bash sync.sh
#
dir_script="$(cd "$(dirname "$0")" && pwd -P)"
##
# This functio symblinks config files to their respective expected
# locations under the user's $HOME directory.
#
symblink_files () {
while read -r file ; do
mkdir -pv "$(dirname "$HOME/$file")"
if [ ! -L "$file" ]; then
if [ -e "$HOME/$file" ]; then
printf '%s\n' "[SKIP]: ~/$file exists and is NOT a symblink..."
else
printf '%s\n' "[SYMB]: ~/$file is being symblinked"
ln -sv "$dir_script/$file" "$HOME/$file"
fi
fi
done < ./MANIFEST-LINUX.txt
}
symblink_files
#
# vim: set tabstop=2 softtabstop=2 shiftwidth=2:
#