aboutsummaryrefslogtreecommitdiffstats
path: root/langs/sv/about/media.po
diff options
context:
space:
mode:
authorYuri Chornoivan <yurchor@ukr.net>2018-09-30 22:33:42 +0300
committerYuri Chornoivan <yurchor@ukr.net>2018-09-30 22:33:42 +0300
commit2321568be728e01ce9dd1d93287fdebbee7dd918 (patch)
tree9f45395d942675f9c9303f440099561fb4891269 /langs/sv/about/media.po
parenteeb58577ef58a5128d1debb9ad3a73c62107d467 (diff)
downloadwww-2321568be728e01ce9dd1d93287fdebbee7dd918.tar
www-2321568be728e01ce9dd1d93287fdebbee7dd918.tar.gz
www-2321568be728e01ce9dd1d93287fdebbee7dd918.tar.bz2
www-2321568be728e01ce9dd1d93287fdebbee7dd918.tar.xz
www-2321568be728e01ce9dd1d93287fdebbee7dd918.zip
Update Slovenian translation
Diffstat (limited to 'langs/sv/about/media.po')
0 files changed, 0 insertions, 0 deletions
n18'>18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66
#!/bin/sh

error() {
    cat <<EOF;
usage: mdkinst_stage2_tool [--clean] [--compress | --uncompress] <stage2 dir> [<compressed file>]
EOF
    exit 1
}

if [ "$1" = "--clean" ]; then
    CLEAN=1
    shift
fi

[ $# = 2 -o $# = 3 ] || error

if [ "$1" = "--compress" -o "$1" == "--uncompress" ]; then
    ACTION=$1
    shift
    STAGE2_DIR="$1"
    shift
    LIVE_DIR="$STAGE2_DIR/live"
    if [ -n "$1" ]; then
	COMPRESSED_IMAGE=$1
	shift
    else
	COMPRESSED_IMAGE="$STAGE2_DIR/mdkinst.sqfs"
    fi
else
    error
fi

if [ $ACTION = "--compress" ]; then
    which mksquashfs >/dev/null 2>/dev/null || { echo "missing command mksquashfs (from squashfs-tools)"; exit 1; }

    [ -d "$LIVE_DIR" ] || error
    echo "Creating $COMPRESSED_IMAGE from $LIVE_DIR"
    rm -f $STAGE2_DIR/.room
    mksquashfs $LIVE_DIR $COMPRESSED_IMAGE -all-root -noappend >/dev/null || { echo "mksquashfs failed"; exit 1; }
    chmod 755 $COMPRESSED_IMAGE
    echo foo > $STAGE2_DIR/.room
    if [ -s $STAGE2_DIR/.room ]; then
	rm -f $STAGE2_DIR/.room
	[ -n "$CLEAN" ] && rm -rf $LIVE_DIR 
    else
	echo "not enough space"
	rm -f $COMPRESSED_IMAGE
	exit 1
    fi
else
    which unsquashfs >/dev/null 2>/dev/null || { echo "missing command unsquashfs (from squashfs-tools)"; exit 1; }

    [ -f "$COMPRESSED_IMAGE" ] || error
    echo "Creating $LIVE_DIR from $COMPRESSED_IMAGE"

    if [ $EUID != "0" ]; then
	SUDO="sudo"
	PATH="/sbin:/usr/sbin:$PATH"
    fi

    unsquashfs -dest $LIVE_DIR $COMPRESSED_IMAGE || { rm -rf $LIVE_DIR; exit 1; }

    [ -n "$CLEAN" ] && rm -f $COMPRESSED_IMAGE
fi

exit 0