Skip to content

Commit 55c51f1

Browse files
committed
updated src code
1 parent b195989 commit 55c51f1

File tree

1 file changed

+34
-20
lines changed

1 file changed

+34
-20
lines changed

push.sh

Lines changed: 34 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22

33
#
4-
# Copyright (C) 2022 Mahmoud Mohamed (Ozil) <https://github.com/mmsaeed509>
4+
# Copyright (C) 2022 Mahmoud Mohamed (00xWolf) <https://github.com/mmsaeed509>
55
# LICENSE © GNU-GPL3
66
#
77

@@ -11,25 +11,42 @@
1111

1212
# a simple script to push your commits to GitHub #
1313

14-
echo -e "\e[0;35m############################# \e[0m"
15-
echo -e "\e[0;35m# Git Push Script # \e[0m"
16-
echo -e "\e[0;35m############################# \e[0m"
14+
## ------------ COLORS ------------ ##
15+
16+
# Reset #
17+
Color_Off='\033[0m' # Text Reset
18+
19+
# Regular Colors #
20+
Black='\033[0;30m' Red='\033[0;31m' Green='\033[0;32m' Yellow='\033[0;33m'
21+
Blue='\033[0;34m' Purple='\033[0;35m' Cyan='\033[0;36m' White='\033[0;37m'
22+
23+
# Bold #
24+
BBlack='\033[1;30m' BRed='\033[1;31m' BGreen='\033[1;32m' BYellow='\033[1;33m'
25+
BBlue='\033[1;34m' BPurple='\033[1;35m' BCyan='\033[1;36m' BWhite='\033[1;37m'
26+
27+
# Underline #
28+
UBlack='\033[4;30m' URed='\033[4;31m' UGreen='\033[4;32m' UYellow='\033[4;33m'
29+
UBlue='\033[4;34m' UPurple='\033[4;35m' UCyan='\033[4;36m' UWhite='\033[4;37m'
30+
31+
# Background #
32+
On_Black='\033[40m' On_Red='\033[41m' On_Green='\033[42m' On_Yellow='\033[43m'
33+
On_Blue='\033[44m' On_Purple='\033[45m' On_Cyan='\033[46m' On_White='\033[47m'
34+
35+
echo ""
36+
echo -e "${BCyan}#############################${Color_Off}"
37+
echo -e "${BCyan}# Git Push Script #${Color_Off}"
38+
echo -e "${BCyan}#############################${Color_Off}"
1739

1840
# get branch name (e.g master, main, etc... ) #
1941
Branch=$(git branch --show-current)
2042

43+
echo -e "\n${BRed}[*] Your Current Branch : ${BYellow}${Branch}${Color_Off}"
44+
2145
# get new updates if it founded #
22-
echo ""
23-
echo "#################"
24-
echo "# Updating Repo #"
25-
echo "#################"
46+
echo -e "\n${BPurple}[+] Updating Repo... \n${Color_Off}"
2647
git pull
2748

28-
29-
echo ""
30-
echo "##################################"
31-
echo "# Adding new changes to the repo #"
32-
echo "##################################"
49+
echo -e "\n${BPurple}[+] Adding new changes to the repo... \n${Color_Off}"
3350
git add --all .
3451

3552
if [ "$1" == "-m" ];
@@ -40,8 +57,8 @@ then
4057
else
4158
# read commit comment from user #
4259
echo ""
43-
echo "##################################"
44-
echo "# Write your commit comment! :- #"
60+
echo -e "${BPurple}##################################${Color_Off}"
61+
echo -e "${BPurple}# Write your commit comment! :- #${Color_Off}"
4562
read yourCommit
4663

4764
# commit changes#
@@ -53,8 +70,5 @@ fi
5370
echo ""
5471
git push -u origin $Branch
5572

56-
echo ""
57-
echo -e "\e[0;35m########################### \e[0m"
58-
echo -e "\e[0;35m# D O N E # \e[0m"
59-
echo -e "\e[0;35m########################### \e[0m"
60-
73+
# D O N E! #
74+
echo -e "\n${BGreen}[✔] D O N E \n${Color_Off}"

0 commit comments

Comments
 (0)