diff --git a/.local/bin/scripts/git-aur b/.local/bin/scripts/git-aur index e45bda8..51be802 100755 --- a/.local/bin/scripts/git-aur +++ b/.local/bin/scripts/git-aur @@ -20,17 +20,23 @@ case "$command" in test -f .gitignore || echo '*' > .gitignore exec $SHELL;; (create) + if ! test -d .git; then "$0" clone "$@"; exit; fi git add -f .gitignore PKGBUILD git commit -m "Create Package" "$@" - git aur push --amend;; + "$0" push --amend;; (commit) makepkg --printsrcinfo > .SRCINFO git add -f .SRCINFO git commit -v "$@";; + (update) + git pull + updpkgsums + makepkg -si + "$0" push;; (push) grep -q SKIP PKGBUILD || updpkgsums git add -f *.install 2>/dev/null || true - git aur commit -a "$@" + "$0" commit -a "$@" git push;; (clean) find "$aurdir" -mindepth 2 -maxdepth 2 \( -iname "*.pkg.tar.*" -o -iname "*.zip" -o -name "*.tar.gz" -o -type d -not -name ".*" \) \ diff --git a/.local/bin/scripts/git-repo b/.local/bin/scripts/git-repo index c9dfc8f..164de74 100755 --- a/.local/bin/scripts/git-repo +++ b/.local/bin/scripts/git-repo @@ -18,8 +18,8 @@ case $1 in (socha) user=software-challenge; host=git@github.com;; (hub) host=git@github.com;; (lab) host=git@gitlab.com;; - (ftt) host=git@code.ftt.gmbh; user=janek;; - (*) host=${1:-gitea@git.jfischer.org};; + (jf) host=${1:-gitea@git.jfischer.org};; + (*|ftt) host=git@code.ftt.gmbh; user=janek;; esac user=${3:-${user:-$(git config user.name)}} repo=${2:-$(basename $PWD)} diff --git a/.local/bin/scripts/rd b/.local/bin/scripts/rd index 220f177..6d28ecf 100755 --- a/.local/bin/scripts/rd +++ b/.local/bin/scripts/rd @@ -15,7 +15,7 @@ do fi # $elevate find -H "$f" -maxdepth $(expr 1 \& "$f" = "/" \| 5 \& $# \> 0 \| 4) -type d -empty -name .stfolder -exec rm -div {} \; - $elevate find -H "$f" -maxdepth $(expr 1 \& "$f" = "/" \| 5 \& $# \> 0 \| 3) -not \( -name '.stfolder' -o -name '.*keep' \) \( -type d -o -type f \) -a -empty -printf 'Removing empty %p\n' -delete + $elevate find -H "$f" -maxdepth $(expr 1 \& "$f" = "/" \| 5 \& $# \> 0 \| 3) -not \( -name '.stfolder' -o -name '.*keep' -o -name "*.py" \) \( -type d -o -type f \) -a -empty -printf 'Removing empty %p\n' -delete test $# -eq 0 && exit $? if test -e "$f"; then echo -n "$f ($(ls -A "$f" | head -3 | paste -s -d' ')) " >&2 && diff --git a/.local/bin/scripts/yt-audio b/.local/bin/scripts/yt-audio new file mode 100755 index 0000000..018c0fb --- /dev/null +++ b/.local/bin/scripts/yt-audio @@ -0,0 +1,2 @@ +#!/bin/sh +yt-dlp --extract-audio "$@"