Commit 811c4e12 authored by Vitaly Lipatov's avatar Vitaly Lipatov

epm pack appimage: add support for AppDir instead of squashfs-root

parent 6a6494c9
......@@ -27,7 +27,7 @@ has_repack_script()
__apply_fix_code()
{
local repackcode="$EPM_REPACK_SCRIPTS_DIR/$1.sh"
[ -s "$repackcode" ] || return
[ -s "$repackcode" ] || return 0
[ -f "$repackcode.rpmnew" ] && warning 'There is .rpmnew file(s) in $EPM_REPACK_SCRIPTS_DIR dir. The pack script can be outdated.'
shift
......
......@@ -34,9 +34,12 @@ if [ -z "$VERSION" ] ; then
[ -n "$VERSION" ] && VERSION="$(echo "$VERSION" | sed -e 's|^v||')"
fi
BASEDIR="squashfs-root"
[ -L "$BASEDIR" ] && [ -d "AppDir" ] && BASEDIR="AppDir"
# try get version from X-AppImage-Version
if [ -z "$VERSION" ] ; then
DESKTOPFILE="$(echo squashfs-root/*.desktop | head -n1)"
DESKTOPFILE="$(echo $BASEDIR/*.desktop | head -n1)"
str="$(grep '^X-AppImage-Version=[0-9]' $DESKTOPFILE)"
if [ -n "$str" ] ; then
VERSION="$(echo $str | sed -e 's|.*X-AppImage-Version=||')"
......@@ -60,9 +63,9 @@ upstream_file: $alpkg
generic_repack: appimage
EOF
chmod og-w -R squashfs-root
chmod a+rX -R squashfs-root
chmod og-w -R $BASEDIR
chmod a+rX -R $BASEDIR
erc pack $PKGNAME squashfs-root
erc pack $PKGNAME $BASEDIR
return_tar $PKGNAME
......@@ -12,12 +12,12 @@ PRODUCTDIR=/opt/$PRODUCT
# move package to /opt
ROOTDIR=$(basename $(find $BUILDROOT -mindepth 1 -maxdepth 1 -type d))
move_to_opt /$ROOTDIR
move_to_opt /$ROOTDIR || fatal
fix_chrome_sandbox
cd $BUILDROOT$PRODUCTDIR
cd $BUILDROOT$PRODUCTDIR || fatal
# TODO
if false ; then
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment