2019-04-19 16:30:10 +03:00
|
|
|
#!/bin/bash
|
2021-06-06 02:47:16 +03:00
|
|
|
|
2021-09-09 11:18:22 +03:00
|
|
|
set -ex
|
|
|
|
|
|
|
|
CALLER_DIR=$( pwd )
|
|
|
|
|
|
|
|
cd "$( dirname "${BASH_SOURCE[0]}" )"
|
2021-06-06 02:47:16 +03:00
|
|
|
|
2022-06-05 22:30:23 +03:00
|
|
|
if [[ "${VSCODE_ARCH}" == "x64" ]]; then
|
2021-06-06 02:47:16 +03:00
|
|
|
wget -c https://github.com/$(wget -q https://github.com/AppImage/pkg2appimage/releases -O - | grep "pkg2appimage-.*-x86_64.AppImage" | head -n 1 | cut -d '"' -f 2)
|
|
|
|
chmod +x ./pkg2appimage-*.AppImage
|
|
|
|
|
|
|
|
./pkg2appimage-*.AppImage --appimage-extract && mv ./squashfs-root ./pkg2appimage.AppDir
|
2021-07-23 11:01:38 +03:00
|
|
|
|
|
|
|
# add update's url
|
2021-06-06 02:47:16 +03:00
|
|
|
sed -i 's/generate_type2_appimage/generate_type2_appimage -u "gh-releases-zsync|VSCodium|vscodium|latest|*.AppImage.zsync"/' pkg2appimage.AppDir/AppRun
|
|
|
|
|
2021-07-23 11:01:38 +03:00
|
|
|
# remove check so build in docker can succeed
|
|
|
|
sed -i 's/grep docker/# grep docker/' pkg2appimage.AppDir/usr/share/pkg2appimage/functions.sh
|
|
|
|
|
2021-09-09 11:18:22 +03:00
|
|
|
bash -ex pkg2appimage.AppDir/AppRun recipe.yml
|
2022-02-03 23:46:31 +03:00
|
|
|
|
2021-09-09 11:18:22 +03:00
|
|
|
rm -f pkg2appimage-*.AppImage
|
|
|
|
rm -rf pkg2appimage.AppDir
|
|
|
|
rm -rf VSCodium
|
2020-10-17 04:20:13 +03:00
|
|
|
fi
|
2021-06-06 02:47:16 +03:00
|
|
|
|
2022-02-03 23:46:31 +03:00
|
|
|
cd "${CALLER_DIR}"
|