29 lines
519 B
Plaintext
29 lines
519 B
Plaintext
|
#!/bin/bash
|
||
|
|
||
|
# . CONFIG.sh
|
||
|
|
||
|
# set -o xtrace ## To debug scripts
|
||
|
# set -o errexit ## To exit on error
|
||
|
# set -o errunset ## To exit if a variable is referenced but not set
|
||
|
|
||
|
|
||
|
function main() {
|
||
|
call_path=`pwd`
|
||
|
path=""
|
||
|
|
||
|
if [[ ! "${1::1}" == /* ]]; then
|
||
|
path="${call_path}/${1}"
|
||
|
else
|
||
|
path="${1}"
|
||
|
fi
|
||
|
|
||
|
if [ ! -d "${path}" ]; then
|
||
|
echo "GWinWrap: Path given not a directory..."
|
||
|
exit 1
|
||
|
fi
|
||
|
|
||
|
cd "/opt/"
|
||
|
python ./gwinwrap.zip "${path}"
|
||
|
}
|
||
|
main "$@";
|