Browse Source

use tar strip-components to extract src

avoids having to manually determine package name, needed for #1743
android-5
Stephen 7 years ago
committed by Fredrik Fornwall
parent
commit
e1163ab5bb
  1. 7
      build-package.sh

7
build-package.sh

@ -472,13 +472,12 @@ termux_step_extract_package() {
folder=`unzip -qql "$file" | head -n1 | tr -s ' ' | cut -d' ' -f5-` folder=`unzip -qql "$file" | head -n1 | tr -s ' ' | cut -d' ' -f5-`
rm -Rf $folder rm -Rf $folder
unzip -q "$file" unzip -q "$file"
mv $folder "$TERMUX_PKG_SRCDIR"
else else
folder=`tar tf "$file" | head -1 | sed 's/^.\///' | sed -e 's/\/.*//'` mkdir "$TERMUX_PKG_SRCDIR"
rm -Rf $folder tar xf "$file" -C "$TERMUX_PKG_SRCDIR" --strip-components=1
tar xf "$file"
fi fi
set -o pipefail set -o pipefail
mv $folder "$TERMUX_PKG_SRCDIR"
} }
# Hook for packages to act just after the package has been extracted. # Hook for packages to act just after the package has been extracted.

Loading…
Cancel
Save