Change underscore in functions to -

This commit is contained in:
flyingscorpio@arch-desktop 2021-09-14 20:42:13 +02:00
parent 12e251ccea
commit 13d3293293

View file

@ -72,7 +72,7 @@ cockpit() { # enable pass-like commands (ex: cockpit git push)
cd "$start_dir" && echo 'done'
}
system_update() {
system-update() {
# Don't update if its a kernel update that will require reboot
if checkupdates >/dev/null 2>&1; then
case "$(checkupdates | grep linux && echo)" in
@ -85,7 +85,7 @@ system_update() {
fi
}
aur_update() {
aur-update() {
local start_dir="$PWD"
local aur_packages=($(find ~/builds -name .git -type d -exec dirname {} \;))
for repo in "${aur_packages[@]}"; do
@ -107,7 +107,7 @@ aur_update() {
cd "$start_dir" || exit 1
}
pull_from_repos() {
pull-from-repos() {
local start_dir="$PWD"
local git_repos=($(find ~ -name .git -type d -not -path '*/.vim/*' -and -not -path '*/.local/*' -and -not -path '*/builds/*' -exec dirname {} \;))
for repo in "${git_repos[@]}"; do
@ -117,7 +117,7 @@ pull_from_repos() {
cd "$start_dir" || exit 1
}
check_unpushed() {
check-unpushed() {
local start_dir="$PWD"
local git_repos=($(find ~ -name .git -type d -not -path '*/.vim/*' -and -not -path '*/.local/*' -and -not -path '*/builds/*' -exec dirname {} \;))
for repo in "${git_repos[@]}"; do
@ -134,14 +134,14 @@ hello() {
if command -v protonvpn >/dev/null 2>&1; then
sudo protonvpn c --cc NL
fi
system_update
system-update
echo -n "Do you want to pull from you git repos? [y/N] "
local answer
read -r answer
case "$answer" in
y)
pull_from_repos
pull-from-repos
;;
*)
echo "Not pulling from git repos."