#!/bin/bash if [ ! -z "$1" ] && [ $1 == "-h" ]; then echo "1st param: site without https://" echo "2nd param: git user" echo "3th param: repo name" echo "4th param: branch" echo "i.e.: git2tar forgit.patachina.it Fabio wsdd main" elif [ -z "$1" ] || [ -z "$2" ] || [ -z "$3" ] || [ -z "$4" ]; then echo "missing parameter, they should be 4" echo "1st param: site without https://" echo "2nd param: git user" echo "3th param: repo name" echo "4th param: branch" echo "i.e.: git2tar forgit.patachina.it Fabio wsdd main" else #echo "wget -O $3.git.tar.gz https://$1/$2/$3/archive/$4.tar.gz" wget -O $3.git.tar.gz https://$1/$2/$3/archive/$4.tar.gz fi