summaryrefslogtreecommitdiffhomepage
path: root/make-tar.sh
blob: cd5abc56e285aba1eeda3635890caf9f134a5d7b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/sh

prefix="$1"
filename="$2"

if  : &&
    cd $(dirname -- "${prefix}") &&
    zip -9r "${filename}" $(basename "${prefix}")
then
    ls -lh -- "${filename}"
    case "$(uname -s)" in
        CYGWIN_*) ls -lh -- "$(cygpath -w -- "$filename")";;
    esac
else
    rm -fv -- "${filename}"
    exit 1
fi

exit 0