Commit e074f688 authored by Vitaly Lipatov's avatar Vitaly Lipatov

erc: fix path to unpacked archives

parent a686a6fe
...@@ -81,24 +81,26 @@ extract_archive() ...@@ -81,24 +81,26 @@ extract_archive()
local type="$(get_archive_type "$arc")" local type="$(get_archive_type "$arc")"
[ -n "$type" ] || fatal "Can't recognize type of $arc." [ -n "$type" ] || fatal "Can't recognize type of $arc."
local rarc="$(realpath -s "$arc")"
# TODO: move to patool # TODO: move to patool
if [ "$type" = "exe" ] ; then if [ "$type" = "exe" ] ; then
local subdir="$(basename "$arc" .exe)" local subdir="$(basename "$arc" .exe)"
mkdir -p "$subdir" && cd "$subdir" || fatal mkdir -p "$subdir" && cd "$subdir" || fatal
docmd $HAVE_7Z x ../"$arc" docmd $HAVE_7Z x "$rarc"
exit exit
fi fi
if [ "$type" = "dll" ] ; then if [ "$type" = "dll" ] ; then
local subdir="$(basename "$arc" .dll)" local subdir="$(basename "$arc" .dll)"
mkdir -p "$subdir" && cd "$subdir" || fatal mkdir -p "$subdir" && cd "$subdir" || fatal
docmd $HAVE_7Z x ../"$arc" docmd $HAVE_7Z x "$rarc"
exit exit
fi fi
if [ "$type" = "AppImage" ] || [ "$type" = "appimage" ] ; then if [ "$type" = "AppImage" ] || [ "$type" = "appimage" ] ; then
docmd chmod u+x "$arc" || fatal "Can't set executable permission" docmd chmod u+x "$rarc" || fatal "Can't set executable permission"
docmd "$(realpath $arc)" --appimage-extract docmd "$rarc" --appimage-extract
mv squashfs-root "$(basename "$(basename "$arc" .AppImage)" .appimage)" mv squashfs-root "$(basename "$(basename "$arc" .AppImage)" .appimage)"
exit exit
fi fi
...@@ -106,7 +108,7 @@ extract_archive() ...@@ -106,7 +108,7 @@ extract_archive()
if [ "$type" = "squashfs" ] ; then if [ "$type" = "squashfs" ] ; then
local subdir="$(basename "$arc" .squashfs)" local subdir="$(basename "$arc" .squashfs)"
mkdir -p "$subdir" && cd "$subdir" || fatal mkdir -p "$subdir" && cd "$subdir" || fatal
docmd $HAVE_7Z x ../"$arc" docmd $HAVE_7Z x "$rarc"
exit exit
fi fi
......
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