Skip to content

Commit 8cec4f4

Browse files
added installation program
1 parent 4282b50 commit 8cec4f4

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

install

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/bin/bash
2+
3+
################################################################################
4+
# installs (or upgrades) doshie in a git-based software project
5+
################################################################################
6+
7+
set -e
8+
9+
# precondition: we're at the root of a git project
10+
if ! ( [[ -d .git ]] && git rev-parse --is-inside-work-tree >/dev/null ); then
11+
echo "this is not the root of a git project" >&2
12+
exit 1
13+
fi
14+
15+
# add the submodule
16+
if [[ ! -d .doshie ]]; then
17+
git submodule add https://github.com/andyichr/doshie.git .doshie
18+
fi
19+
20+
# copy shell bin
21+
cp -f .doshie/shell ./
22+
23+
# update doshie
24+
cd .doshie
25+
git pull

0 commit comments

Comments
 (0)