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

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

if  : &&
    make install &&
    cd $(dirname -- "${prefix}") &&
    tar Jcf "${filename}" $(basename "${prefix}")
then
    ls -lh -- "${filename}"
else
    rm -fv -- "${filename}"
    exit 1
fi

exit 0