Skip to content

Commit

Permalink
scripts/create_addon: reduce $DEVICE complexity
Browse files Browse the repository at this point in the history
  • Loading branch information
Kwiboo committed Jul 11, 2017
1 parent 46b69d2 commit fbc4fd4
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions scripts/create_addon
Expand Up @@ -119,11 +119,7 @@ pack_addon() {
-i $ADDON_BUILD/$PKG_ADDON_ID/addon.xml

if [ "$2" != "-test" ] ; then
if [ -n "${DEVICE}" ]; then
ADDON_INSTALL_DIR="$TARGET/$ADDONS/$ADDON_VERSION/$DEVICE/$TARGET_ARCH/$PKG_ADDON_ID"
else
ADDON_INSTALL_DIR="$TARGET/$ADDONS/$ADDON_VERSION/$PROJECT/$TARGET_ARCH/$PKG_ADDON_ID"
fi
ADDON_INSTALL_DIR="$TARGET/$ADDONS/$ADDON_VERSION/${DEVICE:-$PROJECT}/$TARGET_ARCH/$PKG_ADDON_ID"
if [ -f $ADDON_INSTALL_DIR/$PKG_ADDON_ID-$ADDONVER.zip ] ; then
echo "*** WARNING: $PKG_ADDON_ID-$ADDONVER.zip already exists. not overwriting it ***"
return 0
Expand Down Expand Up @@ -166,11 +162,7 @@ if [ "$PKG_IS_ADDON" = "yes" ] ; then

$SCRIPTS/build $@

if [ -n "${DEVICE}" ]; then
printf "%${BUILD_INDENT}c CREATE ADDON ($DEVICE/$TARGET_ARCH) $1\n" ' '>&$SILENT_OUT
else
printf "%${BUILD_INDENT}c CREATE ADDON ($PROJECT/$TARGET_ARCH) $1\n" ' '>&$SILENT_OUT
fi
printf "%${BUILD_INDENT}c CREATE ADDON (${DEVICE:-$PROJECT}/$TARGET_ARCH) $1\n" ' '>&$SILENT_OUT
export BUILD_INDENT=$((${BUILD_INDENT:-1}+$BUILD_INDENT_SIZE))

rm -rf $ADDON_BUILD
Expand Down

0 comments on commit fbc4fd4

Please sign in to comment.