Browse Source

Better way to moinitor git status and fixed issue #157

old-stable
Mitesh Shah 11 years ago
parent
commit
a34137e43d
  1. 15
      usr/local/sbin/easyengine
  2. 3
      usr/local/sbin/eeupdate

15
usr/local/sbin/easyengine

@ -651,8 +651,7 @@ EEGITINIT()
fi fi
# Check For Untracked Files # Check For Untracked Files
git status | grep clean &>> $INSTALLLOG if [ $(git status -s | wc -l) -ne 0 ]
if [ $? -ne 0 ]
then then
# Add Files In Git Version Control # Add Files In Git Version Control
git add --all && git commit -am "Initialize Git On $EEGITDIR" &>> $INSTALLLOG \ git add --all && git commit -am "Initialize Git On $EEGITDIR" &>> $INSTALLLOG \
@ -663,9 +662,8 @@ EEGITINIT()
EEGITCOMMIT() EEGITCOMMIT()
{ {
cd $EEGITDIR || OwnError "Unable To Change Directory $EEGITDIR" cd $EEGITDIR || OwnError "Unable To Change Directory $EEGITDIR"
git status | grep clean &>> $INSTALLLOG
if [ $? -ne 0 ] if [ $(git status -s | wc -l) -ne 0 ]
then then
# Git Commit Functionality # Git Commit Functionality
echo -e "\033[34mTake $EEGITDIR Configuration In Git Version Control...\e[0m" echo -e "\033[34mTake $EEGITDIR Configuration In Git Version Control...\e[0m"
@ -2438,14 +2436,17 @@ then
# Edit The Nginx Configuration For $DOMAIN # Edit The Nginx Configuration For $DOMAIN
EESITEEDIT EESITEEDIT
# Reload Nginx Configuration if [ $(git status -s /etc/nginx/sites-available/$DOMAIN | wc -l) -ne 0 ]
NGINXRELOAD then
# Take Nginx Configuration In Git Version Control # Take Nginx Configuration In Git Version Control
EEGITDIR=/etc/nginx EEGITDIR=/etc/nginx
EEGITMESSAGE="Edited Website: $DOMAIN" EEGITMESSAGE="Edited Website: $DOMAIN"
EEGITCOMMIT EEGITCOMMIT
# Reload Nginx Configuration
NGINXRELOAD
fi
else else
echo -e "\033[34mList Of Available Commands:\e[0m" echo -e "\033[34mList Of Available Commands:\e[0m"

3
usr/local/sbin/eeupdate

@ -25,8 +25,7 @@ GITCOMMIT ()
fi fi
# Check For Untracked Files # Check For Untracked Files
git status | grep clean &>> $INSTALLLOG if [ $(git status -s | wc -l) -ne 0 ]
if [ $? -ne 0 ]
then then
# Add Files In Git Version Control # Add Files In Git Version Control
git add --all && git commit -am "$EEGITMESSAGE" &>> $INSTALLLOG \ git add --all && git commit -am "$EEGITMESSAGE" &>> $INSTALLLOG \

Loading…
Cancel
Save