Compare commits

..

No commits in common. "5905357692c636aaed95e14866898db1b768ba4d" and "4b0efe2d969145b57afbfd3e7f645f2dcf819357" have entirely different histories.

3 changed files with 12 additions and 14 deletions

View File

@ -1,7 +1,7 @@
pkgbase = pman-helper pkgbase = pman-helper
pkgdesc = A pacman helper script, because you forget all the stupid flags pkgdesc = A pacman helper script, because you forget all the stupid flags
pkgver = 1.2.0 pkgver = 1.2.0
pkgrel = 3 pkgrel = 2
url = https://git.bjphoster.com/source/pman url = https://git.bjphoster.com/source/pman
arch = any arch = any
license = MIT license = MIT

View File

@ -1,9 +1,9 @@
# Maintainer: Bryan Joshua Pedini <bryan [at] pedini [dot] dev> # Maintainer: Bryan Joshua Pedini <bryan [at] pedini [dot] dev>
_pkgname="pman" _pkgname="pman"
pkgname="${_pkgname}-helper" pkgname="$_pkgname-helper"
pkgver="1.2.0" pkgver="1.2.0"
pkgrel="3" pkgrel="2"
pkgdesc="A pacman helper script, because you forget all the stupid flags" pkgdesc="A pacman helper script, because you forget all the stupid flags"
url="https://git.bjphoster.com/source/${_pkgname}" url="https://git.bjphoster.com/source/${_pkgname}"
arch=("any") arch=("any")
@ -11,12 +11,13 @@ license=("MIT")
depends=("bash" "pacman") depends=("bash" "pacman")
conflicts=("pman") # Another package called `pman` currently exists in the AUR conflicts=("pman") # Another package called `pman` currently exists in the AUR
source=("https://git.bjphoster.com/source/${_pkgname}/archive/${pkgver}.tar.gz") source=("https://git.bjphoster.com/source/${_pkgname}/archive/${pkgver}.tar.gz")
sha1sums=("df1f0c0d476619fa6994c72c94f0fd50e08fa74c") sha1sums=("df1f0c0d476619fa6994c72c94f0fd50e08fa74c")
sha256sums=("400980f9d8e4d8df3f95cf8c7430922586ba389289a80d0ba18d127f095d1d84") sha256sums=("400980f9d8e4d8df3f95cf8c7430922586ba389289a80d0ba18d127f095d1d84")
md5sums=("5b424b1b6900b4f8cdcd8a5388be55aa") md5sums=("5b424b1b6900b4f8cdcd8a5388be55aa")
package() { package() {
mkdir -p "${pkgdir}/usr/share/licenses/${pkgname}"
mkdir -p "${pkgdir}/usr/bin"
install -Dm644 "${srcdir}/${_pkgname}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" install -Dm644 "${srcdir}/${_pkgname}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
install -Dm755 "${srcdir}/${_pkgname}/pman.sh" "${pkgdir}/usr/bin/${_pkgname}" install -Dm755 "${srcdir}/${_pkgname}/pman.sh" "${pkgdir}/usr/bin/${_pkgname}"
} }

17
push.sh
View File

@ -1,27 +1,24 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# Get version # Get version
oldver=$(grep "pkgver=" PKGBUILD | sed 's/pkgver="//;s/"//')
if [ $# -eq 1 ]; then if [ $# -eq 1 ]; then
pkgver="$1" pkgver="$1"
else else
echo "Old version: ${oldver}" read -p "Version: " pkgver
read -p "New version: " pkgver
fi fi
# Check version # Check version
# if [ "$pkgver" = "$oldver" ]; then oldver=$(grep "pkgver=" PKGBUILD | sed 's/pkgver="//;s/"//')
# echo >/dev/stderr "Error: same (old) version specified - update aborted" if [ "$pkgver" = "$oldver" ]; then
# exit 1 echo >/dev/stderr "Error: same (old) version specified - update aborted"
# fi exit 1
fi
# Get variables from PKGBUILD # Get variables from PKGBUILD
url=$(grep "source=" PKGBUILD | sed 's/source=("//;s/")//') url=$(grep "source=" PKGBUILD | sed 's/source=("//;s/")//')
pkgname=$(grep "_pkgname=" PKGBUILD | sed 's/_pkgname="//;s/"//') pkgname=$(grep "_pkgname=" PKGBUILD | sed 's/_pkgname="//;s/"//')
aur_url=$(grep "pkgname=" PKGBUILD | tail -n 1 | sed 's/pkgname="//;s/"//')
# Perform variable substitution # Perform variable substitution
archive_url="${url//\$\{_pkgname\}/$pkgname}" archive_url="${url//\$\{_pkgname\}/$pkgname}"
archive_url="${archive_url//\$\{pkgver\}/$pkgver}" archive_url="${archive_url//\$\{pkgver\}/$pkgver}"
aur_url="ssh://aur@aur.archlinux.org/${aur_url//\$\{_pkgname\}/$pkgname}.git"
# Download archive # Download archive
wget -O $pkgname.tar.gz "$archive_url" wget -O $pkgname.tar.gz "$archive_url"
@ -44,6 +41,6 @@ makepkg --printsrcinfo > .SRCINFO
# In case of fire, git commit, git push, leave building # In case of fire, git commit, git push, leave building
git add . git add .
git commit -m "Updated $pkgname to $pkgver" git commit -m "Updated $pkgname to $pkgver"
git remote add aur ${aur_url} git remote add aur ssh://aur@aur.archlinux.org/pman-helper.git
git push origin main git push origin main
git push aur main:master git push aur main:master