-
-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathsetup.sh
More file actions
30 lines (22 loc) · 637 Bytes
/
setup.sh
File metadata and controls
30 lines (22 loc) · 637 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
#!/bin/sh
set -e
while getopts “d” opt; do
case $opt in
d) ECHO=echo ;;
esac
done
echo "Enter your username (Github org):"
read ORG
echo "Enter the name of your project:"
read NAME
update() {
sed -i -e "s/dnnrly/${ORG}/g" ${1}
sed -i -e "s/goclitem/${NAME}/g" ${1}
}
for f in `find . -type f -not -iwholename '*.git/*' -not -iwholename '*tmp*' -not -iwholename '*libexec*' -not -iwholename '*bin*' -not -iwholename '*share*' -not -iwholename '*setup*'`
do
${ECHO} update $f
done
${ECHO} mv ./cmd/goclitem ./cmd/${NAME}
${ECHO} mv ./goclitem.go ./${NAME}.go
${ECHO} mv ./goclitem_test.go ./${NAME}_test.go