Commit 010ddbe9 authored by Jeremy Mathews's avatar Jeremy Mathews
Browse files

Move untarBCl to Script

parent 115a3946
Pipeline #3975 passed with stages
in 1 minute and 50 seconds
......@@ -60,20 +60,7 @@ process untarBCL {
"""
hostname
ulimit -a
folder=\$(tar -tf "$tar" | grep -o "^[^/]*/\$")
folder1=`echo "\$folder" | tr -d ' '`
if [ "\$folder" != "\$folder1" ]
then echo "Error: Spaces found in BCL Directory Path"
echo "\$folder"
exit 21
fi
name=`echo "${tar}" | rev | cut -f1 -d '.' | rev`;
if [ "\${name}" == "gz" ];
then tar -xvf "$tar" -I pigz;
else tar -xvf "$tar";
fi;
bash "$baseDir/scripts/untarBCL.sh" -t "$tar"
"""
}
......
#!/bin/bash
#untarBCL.sh
usage() {
echo "-t --tar file"
exit 1
}
OPTIND=1
while getopts :t: opt
do
case $opt in
t) tar=$OPTARG;;
esac
done
shift $(($OPTIND -1));
echo "This Line"
folder=$(tar -tf '$tar' | grep -o "^[^/]*/\$");
folder1=`echo "$folder" | tr -d ' '`;
if [ "$folder" != "$folder1" ];
then
echo "Error: Spaces found in BCL Directory Path";
echo "$folder";
exit 21;
fi;
name=`echo "${tar}" | rev | cut -f1 -d '.' | rev`;
if [ "${name}" == "gz" ];
then tar -xvf "$tar" -I pigz;
else tar -xvf "$tar";
fi;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment