final f_scripts compatability patch! the strange quote situation is because bash really doesn't like escaping single quotes inside single quotes :/
---
genscripts/gen_alpinepackage.sh | 4 +--genscripts/gen_archpackage.sh | 51 +++++++++++++++++++++++++++++++++
2 files changed, 53 insertions(+), 2 deletions(-)
create mode 100755 genscripts/gen_archpackage.sh
diff --git a/genscripts/gen_alpinepackage.sh b/genscripts/gen_alpinepackage.sh
index 5d3e6c1..adbcf1e 100755
--- a/genscripts/gen_alpinepackage.sh+++ b/genscripts/gen_alpinepackage.sh
@@ -34,13 +34,13 @@ package() {
gen() {
for FILE in ../scripts/f_*; do
- unset DEP DEC+ unset DEP_ALPINE DEC . "$FILE" nonexistentfn 2>/dev/null
SCRIPTNAME="$(basename "$FILE")"
echo ''${SCRIPTNAME}'() {
pkgdesc="$pkgname - '$SCRIPTNAME' script, '$DEC'"
- depends="$depends '$DEP'"+ depends="$depends '$DEP_ALPINE'" install -Dm755 "$builddir"/scripts/'$SCRIPTNAME' "$subpkgdir/usr/bin/'$SCRIPTNAME'"
}
'
diff --git a/genscripts/gen_archpackage.sh b/genscripts/gen_archpackage.sh
new file mode 100755
index 0000000..26ac4c9
--- /dev/null+++ b/genscripts/gen_archpackage.sh
@@ -0,0 +1,51 @@
+#!/usr/bin/env osh+# This is basically a script that generates a PKGBUILD for +# f_scripts with each subpackage. So this is a metaprogramming script+# that generates another script..++# Make sure to run `makepkg --nobuild` to grab, extract, and patch+# sources.++header() {+ echo '# Maintainer: Bobby Hamblin <hamblingreen@hotmail.com>+# Contributor: Miles Alan <m@milesalan.com>++pkgbase=f_scripts+pkgname=('"'"'f_audio'"'"' '"'"'f_files'"'"' '"'"'f_game'"'"' '"'"'f_maps'"'"' '"'"'f_networks'"'"' '"'"'f_phone'"'"' '"'"'f_rss'"'"' '"'"'f_theme'"'"' '"'"'f_timer'"'"' '"'"'f_web'"'"' '"'"'f_youtube'"'"')+pkgver='$(git tag | tail -n1)'+pkgrel=1+pkgdesc="Framebufferphone prompt-driven scripts which are compatible with fbp"+url="http://git.sr.ht/~mil/f_scripts"+arch=('"'"'any'"'"')+license=('"'"'GPL-3.0-or-later'"'"')+depends=('"'"'oil'"'"')+source=("https://git.sr.ht/~mil/f_scripts/archive/$pkgver.tar.gz")+sha256sums=('"'"'SKIP'"'"')+'+}++gen() {+ for FILE in ../scripts/f_*; do+ unset DEP_ARCH DEC+ . "$FILE" nonexistentfn 2>/dev/null+ SCRIPTNAME="$(basename "$FILE")"++ echo 'package_'${SCRIPTNAME}'() {+ pkgdesc="'$DEC'"+ depends=('$DEP_ARCH')+ provides=('"'"''${SCRIPTNAME}''"'"')++ mkdir -p "$pkgdir/usr/bin"+ install "$srcdir/f_scripts-$pkgver/scripts/'$SCRIPTNAME'" "$pkgdir/usr/bin/'$SCRIPTNAME'"+}+'+ done+}++main() {+ cd "$(dirname $(realpath $0))"+ header + gen+}++if [ -n "$1" ]; then "$@"; else main; fi
--
2.38.0