You've already forked reflex-appimage
Compare commits
3 Commits
ea01e5386b
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 5dbc494eb1 | |||
| 2d5d3f5e4c | |||
| d108417945 |
20
.SRCINFO
20
.SRCINFO
@@ -0,0 +1,20 @@
|
||||
pkgbase = reflex-appimage
|
||||
pkgdesc = A next-generation, modern, and lightweight SSH client engineered for absolute efficiency
|
||||
pkgver = 1.0.11
|
||||
pkgrel = 1
|
||||
url = https://github.com/Sunhaiy/Reflex
|
||||
arch = x86_64
|
||||
license = AGPL3
|
||||
depends = fuse2
|
||||
provides = reflex
|
||||
conflicts = reflex
|
||||
options = !strip
|
||||
options = !debug
|
||||
source = reflex-1.0.11.AppImage::https://github.com/Sunhaiy/Reflex/releases/download/v1.0.11/reflex-1.0.11-linux-x86_64.AppImage
|
||||
source = reflex.desktop
|
||||
source = reflex.png
|
||||
sha256sums = 0745ea0dbb05213b36541aab9945479dd3e9a46ab78ff481bae979bb825bc350
|
||||
sha256sums = ee0633f7f8b9d6996eed77120d41c31839891c0177217d38885245491a3156ea
|
||||
sha256sums = 90a0628bd8b3628609e7965d792478cf9f4fcc74a31ef450d0d47148eeb2da0a
|
||||
|
||||
pkgname = reflex-appimage
|
||||
|
||||
8
.autoupdate
Normal file
8
.autoupdate
Normal file
@@ -0,0 +1,8 @@
|
||||
# Autoupdater manifest - consumed by aur/.autoupdate
|
||||
srchost="github"
|
||||
srcmntr="Sunhaiy"
|
||||
srcname="Reflex"
|
||||
verstrip="v"
|
||||
gui="true"
|
||||
desktop="reflex.desktop"
|
||||
icon="reflex.png"
|
||||
2
PKGBUILD
2
PKGBUILD
@@ -6,7 +6,7 @@ _srcmntr="Sunhaiy"
|
||||
|
||||
pkgname="${_pkgname}-appimage"
|
||||
pkgver="1.0.11"
|
||||
pkgrel="4"
|
||||
pkgrel="1"
|
||||
pkgdesc="A next-generation, modern, and lightweight SSH client engineered for absolute efficiency"
|
||||
url="https://github.com/${_srcmntr}/${_srcname}"
|
||||
arch=("x86_64")
|
||||
|
||||
103
push.sh
103
push.sh
@@ -1,103 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Variables
|
||||
gui=true
|
||||
desktop="reflex.desktop"
|
||||
icon="reflex.png"
|
||||
|
||||
# Get version
|
||||
oldver=$(grep -E "^pkgver=" PKGBUILD | sed 's/pkgver="//;s/"//')
|
||||
if [ $# -eq 1 ]; then
|
||||
pkgver="${1}"
|
||||
else
|
||||
echo "Old version: ${oldver}"
|
||||
read -p "New version: " pkgver
|
||||
fi
|
||||
|
||||
# Check version
|
||||
if [ "${pkgver}" = "${oldver}" ] && [ -z "${FORCE_REBUILD}" ]; then
|
||||
echo >/dev/stderr "Error: same (old) version specified - update aborted"
|
||||
exit
|
||||
fi
|
||||
|
||||
# Get variables from PKGBUILD
|
||||
url=$(sed -n '/^source=(/,/)/p' PKGBUILD | grep -oE 'https?://[^"]+')
|
||||
pkgname=$(grep -E "^pkgname=" PKGBUILD | sed 's/pkgname="//;s/"//')
|
||||
_pkgname=$(grep -E "^_pkgname=" PKGBUILD | sed 's/_pkgname="//;s/"//')
|
||||
_srcname=$(grep -E "^_srcname=" PKGBUILD | sed 's/_srcname="//;s/"//')
|
||||
_srcmntr=$(grep -E "^_srcmntr=" PKGBUILD | sed 's/_srcmntr="//;s/"//')
|
||||
_archive=$(grep -E "^_archive=" PKGBUILD | sed 's/_archive="//;s/"//')
|
||||
pkgrel=$(grep -E "^pkgrel=" PKGBUILD | sed 's/pkgrel="//;s/"//')
|
||||
aur_url="ssh://aur@aur.archlinux.org/${pkgname}.git"
|
||||
if [ "${gui}" = "true" ] && [ -n "${_pkgname}" ]; then
|
||||
newdesktop="${_pkgname}.desktop"
|
||||
newicon="${_pkgname}.png"
|
||||
else
|
||||
newdesktop="${package}.desktop"
|
||||
newicon="${package}.png"
|
||||
fi
|
||||
|
||||
# Perform variable substitution
|
||||
url="${url//\$\{_pkgname\}/$_pkgname}"
|
||||
url="${url//\$\{_srcname\}/$_srcname}"
|
||||
url="${url//\$\{_srcmntr\}/$_srcmntr}"
|
||||
url="${url//\$\{pkgver\}/$pkgver}"
|
||||
_archive="${_archive//\$\{_pkgname\}/$_pkgname}"
|
||||
_archive="${_archive//\$\{pkgver\}/$pkgver}"
|
||||
aur_url="${aur_url//\$\{_pkgname\}/$_pkgname}"
|
||||
pkgname="${pkgname//\$\{_pkgname\}/$_pkgname}"
|
||||
|
||||
# Download archive
|
||||
wget -qO ${_archive} "${url}"
|
||||
# Extract icon / .desktop files if appimage
|
||||
if printf '%s' "${_archive,,}" | grep -qi "appimage"; then
|
||||
chmod +x "${_archive}"
|
||||
"./${_archive}" --appimage-extract >/dev/null
|
||||
cp "squashfs-root/${desktop}" "${newdesktop}"
|
||||
cp "squashfs-root/${icon}" "${newicon}"
|
||||
sed -i "/^X-AppImage-/d;/^$/d" "${newdesktop}"
|
||||
sed -i "s/^Exec=.*/Exec=${_pkgname} %U/" "${newdesktop}"
|
||||
rm -rf $(readlink -f squashfs-root) squashfs-root
|
||||
fi
|
||||
# Calculate checksums
|
||||
sha256bin=$(sha256sum ${_archive} | awk '{print $1}')
|
||||
if [ "${gui}" = "true" ]; then
|
||||
sha256dsk=$(sha256sum ${newdesktop} | awk '{print $1}')
|
||||
sha256ico=$(sha256sum ${newicon} | awk '{print $1}')
|
||||
fi
|
||||
# Yoink the archive - unnecessary anymore
|
||||
rm -f ${_archive}
|
||||
|
||||
# Update PKGBUILD with new values
|
||||
sed -i -E "s/^pkgver=\"[^\"]+\"/pkgver=\"$pkgver\"/" PKGBUILD
|
||||
if [ "${gui}" = "true" ]; then
|
||||
sed -i '/^sha256sums=(/,/^)/c\
|
||||
sha256sums=(\
|
||||
"'"$sha256bin"'"\
|
||||
"'"$sha256dsk"'"\
|
||||
"'"$sha256ico"'"\
|
||||
)' PKGBUILD
|
||||
else
|
||||
sed -i -E "s/^sha256sums=\(\"[^\"]+\"\)/sha256sums=(\"$sha256bin\")/" PKGBUILD
|
||||
fi
|
||||
if [ "${pkgver}" != "${oldver}" ] && [ -n "${FORCE_REBUILD}" ]; then
|
||||
sed -i -E "s/^pkgrel=\"[^\"]+\"/pkgrel=\"1\"/" PKGBUILD
|
||||
fi
|
||||
# Update .SRCINFO
|
||||
makepkg --printsrcinfo > .SRCINFO
|
||||
|
||||
# Create git message with correct variable
|
||||
if [ -n "$_pkgname" ]; then
|
||||
commit_msg="Updated ${pkgname//\$\{_pkgname\}/_pkgname} to ${pkgver}-${pkgrel}"
|
||||
else
|
||||
commit_msg="Updated ${pkgname} to ${pkgver}-${pkgrel}"
|
||||
fi
|
||||
|
||||
if [ -z "${NO_GIT_PUSH}" ]; then
|
||||
# In case of fire, git commit, git push, leave building
|
||||
git add .
|
||||
git commit -m "${commit_msg}"
|
||||
git remote add aur ${aur_url}
|
||||
git push origin main
|
||||
git push aur main:master
|
||||
fi
|
||||
Reference in New Issue
Block a user