File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -8,10 +8,8 @@ pkgrel="${PKGREL:-1}"
88
99if [[ " $tag " =~ ^v[0-9]+\. [0-9]+\. [0-9]+$ ]]; then
1010 pkgname=' t3code-bin'
11- icon_path=' assets/prod/black-universal-1024.png'
1211elif [[ " $tag " =~ ^v[0-9]+\. [0-9]+\. [0-9]+-nightly\. [0-9]{8}\. [0-9]+$ ]]; then
1312 pkgname=' t3code-nightly-bin'
14- icon_path=' assets/nightly/nightly-universal-1024.png'
1513else
1614 echo " Release $tag does not publish an AUR package."
1715 exit 0
3230
3331work_dir=" $( mktemp -d) "
3432trap ' rm -rf -- "$work_dir"' EXIT
35- gh api -H ' Accept: application/vnd.github.raw' \
36- " repos/$repo /contents/$icon_path ?ref=$tag " > " $work_dir /icon.png"
3733gh api -H ' Accept: application/vnd.github.raw' \
3834 " repos/$repo /contents/LICENSE?ref=$tag " > " $work_dir /LICENSE"
39- icon_sha256=" $( sha256sum " $work_dir /icon.png" | awk ' {print $1}' ) "
4035license_sha256=" $( sha256sum " $work_dir /LICENSE" | awk ' {print $1}' ) "
4136
4237package_dir=" $repo_root /packaging/aur/$pkgname "
@@ -45,7 +40,6 @@ sed -Ei \
4540 -e " s/^pkgver=.*/pkgver=$pkgver /" \
4641 -e " s/^pkgrel=.*/pkgrel=$pkgrel /" \
4742 -e " /# AppImage$/s/'[0-9a-f]{64}'/'$appimage_sha256 '/" \
48- -e " /# icon$/s/'[0-9a-f]{64}'/'$icon_sha256 '/" \
4943 -e " /# upstream license$/s/'[0-9a-f]{64}'/'$license_sha256 '/" \
5044 PKGBUILD
5145
Original file line number Diff line number Diff line change @@ -46,12 +46,10 @@ options=('!debug' '!strip')
4646_appimage=" T3-Code-${pkgver} -x86_64.AppImage"
4747source=(
4848 " $_appimage ::https://github.com/pingdotgg/t3code/releases/download/v${pkgver} /$_appimage "
49- " ${pkgname} -${pkgver} .png::https://raw.githubusercontent.com/pingdotgg/t3code/v${pkgver} /assets/prod/black-universal-1024.png"
5049 " ${pkgname} -${pkgver} -LICENSE::https://raw.githubusercontent.com/pingdotgg/t3code/v${pkgver} /LICENSE"
5150)
5251sha256sums=(
5352 ' 415c8648f43c3d22d572f27f2c50fdc8c310ea7fcde9537b903e1e2f1c8775a1' # AppImage
54- ' 403e874556ffbecee8d1b2b5d612a874303fac791212a261bb3bd1b71d83e78d' # icon
5553 ' 935d8f2af0c703f9c39517ee57cc4930b19d02d533be930b63f0e82f93614b43' # upstream license
5654)
5755
@@ -79,8 +77,13 @@ exec /opt/t3code-bin/AppRun "$@"
7977EOF
8078 ln -s t3code " $pkgdir /usr/bin/t3-code-desktop"
8179
82- install -Dm644 " $srcdir /${pkgname} -${pkgver} .png" \
83- " $pkgdir /usr/share/icons/hicolor/1024x1024/apps/t3code.png"
80+ # Icon lookup only sees sizes registered in hicolor's index.theme (max 512x512).
81+ local icon size_dir
82+ for icon in " $srcdir " /squashfs-root/usr/share/icons/hicolor/* /apps/t3code.png; do
83+ size_dir=" ${icon%/ apps/ t3code.png} "
84+ install -Dm644 " $icon " \
85+ " $pkgdir /usr/share/icons/hicolor/${size_dir##*/ } /apps/t3code.png"
86+ done
8487
8588 install -Dm644 /dev/stdin " $pkgdir /usr/share/applications/t3code.desktop" << 'EOF '
8689[Desktop Entry]
Original file line number Diff line number Diff line change @@ -47,12 +47,10 @@ _upstream_version="${pkgver/_nightly./-nightly.}"
4747_appimage=" T3-Code-${_upstream_version} -x86_64.AppImage"
4848source=(
4949 " $_appimage ::https://github.com/pingdotgg/t3code/releases/download/v${_upstream_version} /$_appimage "
50- " ${pkgname} -${pkgver} .png::https://raw.githubusercontent.com/pingdotgg/t3code/v${_upstream_version} /assets/nightly/nightly-universal-1024.png"
5150 " ${pkgname} -${pkgver} -LICENSE::https://raw.githubusercontent.com/pingdotgg/t3code/v${_upstream_version} /LICENSE"
5251)
5352sha256sums=(
5453 ' c4dea5bba9ed0b51b2f60f2d4a4867e61d62b57c50ea66f2792a73112e054566' # AppImage
55- ' 7e59b6394016ef83ed1e946847769e01bf36d4062c5c5af2577fd3e228285fd9' # icon
5654 ' 935d8f2af0c703f9c39517ee57cc4930b19d02d533be930b63f0e82f93614b43' # upstream license
5755)
5856
@@ -80,8 +78,13 @@ exec /opt/t3code-nightly-bin/AppRun "$@"
8078EOF
8179 ln -s t3code-nightly " $pkgdir /usr/bin/t3-code-nightly-desktop"
8280
83- install -Dm644 " $srcdir /${pkgname} -${pkgver} .png" \
84- " $pkgdir /usr/share/icons/hicolor/1024x1024/apps/t3code-nightly.png"
81+ # Icon lookup only sees sizes registered in hicolor's index.theme (max 512x512).
82+ local icon size_dir
83+ for icon in " $srcdir " /squashfs-root/usr/share/icons/hicolor/* /apps/t3code.png; do
84+ size_dir=" ${icon%/ apps/ t3code.png} "
85+ install -Dm644 " $icon " \
86+ " $pkgdir /usr/share/icons/hicolor/${size_dir##*/ } /apps/t3code-nightly.png"
87+ done
8588
8689 install -Dm644 /dev/stdin " $pkgdir /usr/share/applications/t3code.desktop" << 'EOF '
8790[Desktop Entry]
You can’t perform that action at this time.
0 commit comments