-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcreate event script
40 lines (35 loc) · 1.08 KB
/
create event script
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
#!/bin/bash
#
# usage: ./$0 <new_branch_name> <email_address>
#
#
usage(){
echo
echo "usage: $0 <new_branch_name> <email_address>"
echo
exit 1
}
[[ -z $2 ]] && usage
BRANCH_NAME=$1
EMAIL_ADDRESS=$2
REPO_LOCATION=~/repos/
REPO_NAME=event-in-a-box
[email protected]:mary-grace/event-in-a-box.git
cd $REPO_LOCATION/$REPO_NAME
#cd $REPO_LOCATION || (echo "repo location doesn't exit" && exit 2)
#cd $REPO_URL || git clone $REPO_URL
git fetch
git pull
git checkout master
git branch $BRANCH_NAME
touch .$BRANCH_NAME-marker
git add .$BRANCH_NAME-marker
git commit -m 'adding marker for new branch $BRANCH_NAME'
git push origin $BRANCH_NAME
echo; echo ; echo; echo
echo $EMAIL_ADDRESS
echo 'Your event in a box is ready!'
echo "Congratulations! Your event has been accepted into the official list of places $COMPANYNAME will be represented this year. What's the next step? [Go to your checklist](https://github.com/mary-grace/event-in-a-box/tree/$BRANCH_NAME) and save this link so you can edit it as you go.
I look forward to seeing you on one of the upcoming office hours.
Best,
-m."