diff options
author | xyz <gky44px1999@gmail.com> | 2022-10-09 18:36:57 -0700 |
---|---|---|
committer | xyz <gky44px1999@gmail.com> | 2022-10-09 18:36:57 -0700 |
commit | eeebaa28ccdc614cf87375627a7e408a8544704a (patch) | |
tree | e97388fa90036c8ac11ac433d3703086df739df8 /home/xyz/.local | |
parent | 34e175d23e503c76499a62047cd13c5a79b7edea (diff) |
add mpra
Diffstat (limited to 'home/xyz/.local')
-rwxr-xr-x | home/xyz/.local/bin/mpra | 24 |
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 |