Changeset 40635


Ignore:
Timestamp:
Jul 18, 2017, 8:11:00 PM (2 years ago)
Author:
gost
Message:

[plugins] arm multiimage add xz images

File:
1 edited

Legend:

Unmodified
Added
Removed
  • ipk/source.arm/tools_multiimage/_path_/usr/local/share/titan/plugins/multiimage/multi_unpack.sh

    r39617 r40635  
    2323swapon "$SWAP"
    2424
    25 echo "[multi_unpack] unzip Image ... takes a moment"
     25EXT="zip"
     26if [ `ls $IMAGE | grep .xz | wc -l` -gt 0 ]; then
     27                EXT="xz"
     28fi
    2629
    27 rm -r "$TEMP" > /dev/null 2>&1
    28 mkdir "$TEMP" > /dev/null 2>&1
     30if [ $EXT == "xz" ]; then
     31        echo "[multi_unpack] move Image ... takes a moment"
     32        rm -r /tmp/dm900 > /dev/null 2>&1
     33        mkdir /tmp/dm900 > /dev/null 2>&1
     34        mv $IMAGE /tmp/dm900 > /dev/null 2>&1
     35else
     36        echo "[multi_unpack] unzip Image ... takes a moment"
    2937
    30 mv $IMAGE $TEMP
     38        rm -r "$TEMP" > /dev/null 2>&1
     39        mkdir "$TEMP" > /dev/null 2>&1
    3140
    32 rm -r /tmp/atemio > /dev/null 2>&1
    33 rm -r /tmp/xpeedlx > /dev/null 2>&1
    34 rm -r /tmp/xpeedlx3 > /dev/null 2>&1
    35 rm -r /tmp/dm900 > /dev/null 2>&1
     41        mv $IMAGE $TEMP
    3642
    37 unzip $TEMP/*.zip -d /tmp
    38 rm $TEMP/*.zip  > /dev/null 2>&1
     43        rm -r /tmp/atemio > /dev/null 2>&1
     44        rm -r /tmp/xpeedlx > /dev/null 2>&1
     45        rm -r /tmp/xpeedlx3 > /dev/null 2>&1
     46        rm -r /tmp/dm900 > /dev/null 2>&1
     47
     48        unzip $TEMP/*.zip -d /tmp
     49        rm $TEMP/*.zip  > /dev/null 2>&1
     50fi
    3951
    4052echo "[multi_unpack] extract Image ... takes a few minutes"
     
    5668if [ -d /tmp/dm900 ]; then
    5769        mkdir $ZIEL/titan_multi/$NAME
    58         tar xjf ./rootfs.tar.bz2 -C $ZIEL/titan_multi/$NAME
    59         rm ./rootfs.tar.bz2
     70        if [ $EXT == "xz" ]; then
     71                tar xJf ./*.xz -C $ZIEL/titan_multi/$NAME
     72                rm ./*.xz
     73        else
     74                tar xjf ./rootfs.tar.bz2 -C $ZIEL/titan_multi/$NAME
     75                rm ./rootfs.tar.bz2
     76        fi
    6077else
    6178        $EXTRACT ./rootfs.bin -k -o $TEMP
Note: See TracChangeset for help on using the changeset viewer.