summaryrefslogtreecommitdiff
path: root/home
diff options
context:
space:
mode:
authorxyz <gky44px1999@gmail.com>2022-10-09 18:36:57 -0700
committerxyz <gky44px1999@gmail.com>2022-10-09 18:36:57 -0700
commiteeebaa28ccdc614cf87375627a7e408a8544704a (patch)
treee97388fa90036c8ac11ac433d3703086df739df8 /home
parent34e175d23e503c76499a62047cd13c5a79b7edea (diff)
add mpra
Diffstat (limited to 'home')
-rwxr-xr-xhome/xyz/.local/bin/mpra24
1 files changed, 24 insertions, 0 deletions
diff --git a/home/xyz/.local/bin/mpra b/home/xyz/.local/bin/mpra
new file mode 100755
index 00000000..86ecfd35
--- /dev/null
+++ b/home/xyz/.local/bin/mpra
@@ -0,0 +1,24 @@
+#!/bin/sh
+# MakePkg Repo-Add
+
+fn () {
+ find . -maxdepth 1 -type f -name '*.pkg.tar.zst' -delete
+ makepkg -f
+ newpkg="$(find . -maxdepth 1 -type f -name '*.pkg.tar.zst')"
+ mv "$newpkg" ..
+ # for first time initialization, need manually repo-add
+ repo-add -R "$(find .. -maxdepth 1 -type f -name '*.db.tar.gz')" "../$newpkg"
+}
+
+upd -p
+
+if [ $# -eq 0 ]; then
+ fn
+else
+ for dir; do
+ cd -- "$(realpath -- "$dir")" || exit
+ fn
+ done
+fi
+
+upd -p