-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmakesymlinks.sh
More file actions
executable file
·46 lines (32 loc) · 962 Bytes
/
makesymlinks.sh
File metadata and controls
executable file
·46 lines (32 loc) · 962 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
35
36
37
38
39
40
41
42
43
44
45
#!/bin/bash
############################
# .make.sh
# This script creates symlinks from the home directory to any desired dotfiles in ~/dotfiles
############################
dotfilesDir=~/dotfiles/dotfiles
configDir=~/dotfiles/config
backupDir=~/dotfiles_old
echo "Creating $backupDir and $backupDir/config..."
mkdir -p $backupDir/config
echo "Creating $backupDir and $backupDir/config... done"
echo "cd $dotfilesDir"
echo ""
cd $dotfilesDir
for file in *; do
echo "Backing up $file to $backupDir/$file"
mv ~/.$file $backupDir/
echo "Creating symlink to $file in home directory"
ln -s $dotfilesDir/$file ~/.$file
echo ""
done
echo "cd $configDir"
echo ""
cd $configDir
mkdir ~/.config
for file in *; do
echo "Backing up .config/$file to $backupDir/config/$file"
mv ~/.config/$file $backupDir/config/
echo "Creating symlink to $file in ~/.config directory"
ln -s $configDir/$file ~/.config/$file
echo ""
done