Someone
public text v1 · immutable 1 #!/bin/bash
2 COMMAND=`echo $1 | cut -d \= -f 1`
3 FILESPEC=$2
4 TYPE=`file $2 | cut -d \: -f 2 | cut -c 2-`
5 echo $TYPE
6 echo $COMMAND
7
8 case "$COMMAND" in
9 --extract-to)
10 if [ "`echo $TYPE | grep -ic zip\ archive`" = "1" ]; then
11 LOCATION=`echo $1 | cut -d \= -f 2`
12 UNZIP=`which unzip`
13 `$UNZIP -x $FILESPEC -d $LOCATION`
14 fi
15 ;;
16 esac