Fixed Git Function
This commit is contained in:
parent
4f847b0dd1
commit
b9888285ab
@ -55,12 +55,32 @@ fi
|
|||||||
}
|
}
|
||||||
|
|
||||||
function gac() {
|
function gac() {
|
||||||
|
if [ -d ".git" ]; then
|
||||||
echo "Log Message: "
|
echo "Log Message: "
|
||||||
read logmessage
|
read logmessage
|
||||||
git add --all && git commit --allow-empty-message -m "$logmessage"
|
git add . --all && git commit --allow-empty-message -m "$logmessage"
|
||||||
|
else
|
||||||
|
echo "No .git Folder found in Directory. Are you in the Correct Folder?"
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
# Pull all Git repos in this dir
|
||||||
|
function pullall() {
|
||||||
|
for dir in */ ; do
|
||||||
|
# Execute in subshell
|
||||||
|
(
|
||||||
|
cd "$dir" || exit 1
|
||||||
|
# If it's a git directory, then update it
|
||||||
|
if test -d .git; then
|
||||||
|
echo "$dir is a Git repo. Pulling master branch..." && git checkout master && git pull && echo ""
|
||||||
|
else
|
||||||
|
echo "$dir is not a Git repo." && echo ""
|
||||||
|
fi
|
||||||
|
)
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
# Updates packages from all sources
|
# Updates packages from all sources
|
||||||
function update() {
|
function update() {
|
||||||
if command -v snap >/dev/null; then
|
if command -v snap >/dev/null; then
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user