summaryrefslogtreecommitdiff
path: root/bin/.bin/dotstow
diff options
context:
space:
mode:
authorShubham Saini <pryr@pryr.xyz>2020-12-01 20:21:04 +0000
committerShubham Saini <pryr@pryr.xyz>2020-12-01 20:21:04 +0000
commit1ff834e2b06761b083df9959d6c3d6bd2a94d2de (patch)
treeabb8ff13bab1c6b5a0c0b17f2d29c058358d2135 /bin/.bin/dotstow
parent90e96958f919df1f914381e93a97d77506fdcf03 (diff)
mah thinkpad
Diffstat (limited to 'bin/.bin/dotstow')
-rwxr-xr-xbin/.bin/dotstow21
1 files changed, 21 insertions, 0 deletions
diff --git a/bin/.bin/dotstow b/bin/.bin/dotstow
new file mode 100755
index 0000000..bcadc5e
--- /dev/null
+++ b/bin/.bin/dotstow
@@ -0,0 +1,21 @@
1#!/bin/bash
2
3# This script will Stow all the dotfiles located in the ~/dotfiles folder.
4# The -R flag is used to force a 'restow' which will remove any existing symlinks before attempting to Stow.
5
6echo "Stowing Dotfiles...";
7
8cd ~/dotfiles
9for file in ~/dotfiles/*; do
10 # Only run Stow on the directories in the dotfiles folder and not the individual files.
11 # Using 'basename' strips the filepath from the directory name.
12 if [ -d ${file} ]; then
13 stow -R $(basename $file)
14 echo "$(basename $file) stowed.";
15 fi
16done
17
18# Return back to the your PWD from before you ran the script
19cd ~-
20
21echo 'All stowed';