-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpush.sh
30 lines (27 loc) · 1.22 KB
/
push.sh
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
#!/bin/sh
# MIRAGE - xda@Des-franco
FRANCO=https://github.com/Open-Wise
. colors
DIR=`pwd`
DIR2=`echo $DIR | cut -c 24-50`
REPO=https://github.com/Open-Wise/`echo $DIR2`
APPS=`echo $DIR | cut -c 38-50`
# echo -e $CL_CYN"Pushing commits to "$CL_RST""remote="$CL_CYN"franco" "$CL_RST""branch="$CL_CYN"mirage""$CL_RST
# echo -e "REPOSITORY: "$CL_CYN"`echo $REPO`"$CL_RST""
# Git configurations
BRANCH=`cat .git/HEAD | cut -c 17-30`
if [ "$REPO" == "$FRANCO/frameworks/base" ]; then
REPO=$FRANCO/frameworks_base_slim
echo -e $CL_YLW"Pushing commits to "$CL_RST""remote="$CL_CYN"franco" "$CL_RST""branch="$CL_CYN"$BRANCH""$CL_RST
echo -e "REPOSITORY: "$CL_YLW"`echo $REPO`"$CL_RST""
git push -u franco $BRANCH
elif [ "$REPO" == "$FRANCO/packages/apps/$APPS" ]; then
REPO=$FRANCO/packages_apps_$APPS
echo -e $CL_YLW"Pushing commits to "$CL_RST""remote="$CL_CYN"franco" "$CL_RST""branch="$CL_CYN"$BRANCH""$CL_RST
echo -e "REPOSITORY: "$CL_YLW"`echo $REPO`"$CL_RST""
git push -u franco $BRANCH
else
echo -e $CL_YLW"Pushing commits to "$CL_RST""remote="$CL_CYN"franco" "$CL_RST""branch="$CL_CYN"$BRANCH""$CL_RST
echo -e "REPOSITORY: "$CL_YLW"`echo $REPO`"$CL_RST""
git push -u franco $BRANCH
fi