Added sudo -v to update within .bash_aliases
This commit is contained in:
parent
84ffed1750
commit
886d3c259d
@ -58,7 +58,7 @@ function gac() {
|
||||
if [ -d ".git" ]; then
|
||||
echo "Log Message: "
|
||||
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
|
||||
@ -73,12 +73,12 @@ function pullall() {
|
||||
cd "$dir" || exit 1
|
||||
# If it's a git directory, then update it
|
||||
if test -d .git; then
|
||||
|
||||
if [ "$(grep -c -i ""master"" .git/config )" -gt 0 ]; then
|
||||
echo "$dir is a Git repo. Pulling master branch..." && git checkout master && git pull && echo ""
|
||||
# Check if its Master or Main
|
||||
if [ "$(grep -c -i ""master"" .git/config )" -gt 0 ]; then
|
||||
echo "$dir is a Git repo. Pulling master branch..." && git checkout master && git pull && echo ""
|
||||
|
||||
elif [ "$(grep -c -i ""main"" .git/config )" -gt 0 ]; then
|
||||
echo "$dir is a Git repo. Pulling main branch..." && git checkout main && git pull && echo ""
|
||||
elif [ "$(grep -c -i ""main"" .git/config )" -gt 0 ]; then
|
||||
echo "$dir is a Git repo. Pulling main branch..." && git checkout main && git pull && echo ""
|
||||
fi
|
||||
else
|
||||
echo "$dir is not a Git repo." && echo ""
|
||||
@ -89,7 +89,9 @@ function pullall() {
|
||||
|
||||
# Updates packages from all sources
|
||||
function update() {
|
||||
if command -v snap >/dev/null; then
|
||||
sudo -v
|
||||
|
||||
if command -v snap >/dev/null; then
|
||||
echo "Updating Snaps..."
|
||||
sudo snap refresh
|
||||
fi
|
||||
|
||||
Loading…
Reference in New Issue
Block a user