selinux: Add policy for qa/455 and pmdarsyslog
[pcp.git] / scripts / zip2tar
blobcb75c1fbe768e458d22958a36de5046236d62413
1 #!/bin/sh
3 # Convert a .zip file from github into .tar.gz
5 # Copyright (c) 2015 Red Hat.
6 #
7 # This program is free software; you can redistribute it and/or modify it
8 # under the terms of the GNU General Public License as published by the
9 # Free Software Foundation; either version 2 of the License, or (at your
10 # option) any later version.
12 # This program is distributed in the hope that it will be useful, but
13 # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
14 # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15 # for more details.
18 zip="$1"
19 tgz="$2"
21 status=1
22 here=`pwd`
23 tmp=`mktemp -d /tmp/pcp.XXXXXXXXX` || exit 1
24 trap "rm -rf $tmp; exit \$status" 0 1 2 3 15
26 if [ -z "$zip" -o -z "$tgz" ]
27 then
28 echo "Usage: $0 zipfile tgzfile"
29 exit 1
32 cd $tmp
33 unzip -q "$zip"
34 cd *
35 tar czf "$tgz" *
36 cd "$here"
37 echo "Wrote: $tgz"
39 status=0
40 exit