mirror of
https://github.com/wahyd4/gvm.git
synced 2026-08-22 19:28:04 +10:00
Added
This commit is contained in:
Executable
+29
@@ -0,0 +1,29 @@
|
||||
#!/bin/bash
|
||||
if [[ $1 == "commit" ]]; then
|
||||
mv $GVM_ROOT/git.bak $GVM_ROOT/.git
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Couldn't find git info"
|
||||
exit 1
|
||||
fi
|
||||
if [[ -n $2 ]]; then
|
||||
cd $GVM_ROOT && git add . && git commit -m "$2"
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Failed to commit"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
cd $GVM_ROOT && git push
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Failed to push"
|
||||
exit 1
|
||||
fi
|
||||
mv $GVM_ROOT/.git $GVM_ROOT/git.bak
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Couldn't backup git info"
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
echo "Please use gvm [action] to call this file"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user