mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-29 13:46:49 +00:00
(cosmetics) scripts/unpack: cosmetics
This commit is contained in:
parent
fbf57d1b47
commit
b9284db4a3
@ -58,21 +58,21 @@ printf "%${BUILD_INDENT}c ${boldcyan}UNPACK${endcolor} $1\n" ' '>&$SILENT_OUT
|
|||||||
export BUILD_INDENT=$((${BUILD_INDENT:-1}+$BUILD_INDENT_SIZE))
|
export BUILD_INDENT=$((${BUILD_INDENT:-1}+$BUILD_INDENT_SIZE))
|
||||||
|
|
||||||
# unset functions
|
# unset functions
|
||||||
unset -f pre_unpack
|
unset -f pre_unpack
|
||||||
unset -f unpack
|
unset -f unpack
|
||||||
unset -f post_unpack
|
unset -f post_unpack
|
||||||
unset -f pre_patch
|
unset -f pre_patch
|
||||||
unset -f post_patch
|
unset -f post_patch
|
||||||
|
|
||||||
. $PKG_DIR/package.mk
|
. $PKG_DIR/package.mk
|
||||||
|
|
||||||
if [ "$(type -t pre_unpack)" = "function" ]; then
|
if [ "$(type -t pre_unpack)" = "function" ]; then
|
||||||
pre_unpack
|
pre_unpack
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$(type -t unpack)" = "function" ]; then
|
if [ "$(type -t unpack)" = "function" ]; then
|
||||||
unpack
|
unpack
|
||||||
else
|
else
|
||||||
if [ -n "$PKG_URL" ]; then
|
if [ -n "$PKG_URL" ]; then
|
||||||
$SCRIPTS/extract $1 "$1*.tar.bz2" $BUILD
|
$SCRIPTS/extract $1 "$1*.tar.bz2" $BUILD
|
||||||
$SCRIPTS/extract $1 "$1*.tbz" $BUILD
|
$SCRIPTS/extract $1 "$1*.tbz" $BUILD
|
||||||
@ -83,19 +83,20 @@ export BUILD_INDENT=$((${BUILD_INDENT:-1}+$BUILD_INDENT_SIZE))
|
|||||||
$SCRIPTS/extract $1 "$1*.7z" $BUILD
|
$SCRIPTS/extract $1 "$1*.7z" $BUILD
|
||||||
$SCRIPTS/extract $1 "$1*.zip" $BUILD
|
$SCRIPTS/extract $1 "$1*.zip" $BUILD
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "$PKG_SOURCE_DIR" ]; then
|
if [ -n "$PKG_SOURCE_DIR" ]; then
|
||||||
mv $BUILD/$PKG_SOURCE_DIR $BUILD/$PKG_NAME-$PKG_VERSION
|
mv $BUILD/$PKG_SOURCE_DIR $BUILD/$PKG_NAME-$PKG_VERSION
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -d "$PKG_DIR/sources" ]; then
|
if [ -d "$PKG_DIR/sources" ]; then
|
||||||
[ ! -d "$BUILD/${PKG_NAME}-${PKG_VERSION}" ] && mkdir -p $BUILD/${PKG_NAME}-${PKG_VERSION}
|
[ ! -d "$BUILD/${PKG_NAME}-${PKG_VERSION}" ] && mkdir -p $BUILD/${PKG_NAME}-${PKG_VERSION}
|
||||||
cp -PRf $PKG_DIR/sources/* $BUILD/${PKG_NAME}-${PKG_VERSION}
|
cp -PRf $PKG_DIR/sources/* $BUILD/${PKG_NAME}-${PKG_VERSION}
|
||||||
fi
|
fi
|
||||||
if [ "$(type -t post_unpack)" = "function" ]; then
|
|
||||||
|
if [ "$(type -t post_unpack)" = "function" ]; then
|
||||||
post_unpack
|
post_unpack
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$(type -t pre_patch)" = "function" ]; then
|
if [ "$(type -t pre_patch)" = "function" ]; then
|
||||||
pre_patch
|
pre_patch
|
||||||
|
Loading…
x
Reference in New Issue
Block a user