bin: update git scripts

This commit is contained in:
xeruf 2023-03-13 15:34:16 +01:00
parent cecb4cef0f
commit 2dbc06047f
4 changed files with 13 additions and 5 deletions

View File

@ -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 ".*" \) \

View File

@ -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)}

View File

@ -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 &&

2
.local/bin/scripts/yt-audio Executable file
View File

@ -0,0 +1,2 @@
#!/bin/sh
yt-dlp --extract-audio "$@"