Skip to content
This repository was archived by the owner on Mar 2, 2020. It is now read-only.

Commit 033a1ab

Browse files
author
Hank Chan
committed
build(transfer.sh): Add transfer script
1 parent fbe8f69 commit 033a1ab

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

script/transfer.sh

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/usr/bin/env bash
2+
#!/usr/bin/env zsh
3+
#
4+
# Transfer git-stack to PATH upon each commit automatically
5+
6+
main() {
7+
if [ -d "$HOME/.script/bin" ]; then # look for ~/.script/bin first
8+
cp -v './git-commands' "$HOME/.script/bin"
9+
10+
elif [ -d "$HOME/bin" ]; then # default to ~/bin
11+
cp -v './git-commands' "$HOME/bin"
12+
13+
else
14+
echo 'transfer.sh does not know where to put git-stack. Please do it manually.'
15+
exit 1
16+
17+
fi
18+
19+
echo -e '\e[92mComplete \e[0m' # Light green followed by white
20+
echo ' '
21+
}
22+
23+
main

0 commit comments

Comments
 (0)