|
|
@ -4,14 +4,15 @@ REPO_TYPE=$1 |
|
|
|
REPO_NAME=$2 |
|
|
|
|
|
|
|
function usage { |
|
|
|
local BASECMD=$(basename "$0") |
|
|
|
local basecmd |
|
|
|
basecmd=$(basename "$0") |
|
|
|
echo 'usage: <REPO_TYPE> <REPO_NAME> [DESTINATION]' |
|
|
|
echo 'example:' |
|
|
|
echo -e '\t# REPO_TYPE=github' |
|
|
|
echo -e "\t$BASECMD github Dolibarr/dolibarr\n" |
|
|
|
echo -e "\t${basecmd} github Dolibarr/dolibarr\n" |
|
|
|
echo -e '\t# REPO_TYPE=artcode' |
|
|
|
echo -e "\t$BASECMD artcode libre/libre-gnome\n" |
|
|
|
exit -1 |
|
|
|
echo -e "\t${basecmd} artcode libre/libre-gnome\n" |
|
|
|
exit 1 |
|
|
|
} |
|
|
|
|
|
|
|
function get_github { |
|
|
@ -34,10 +35,7 @@ function get_github { |
|
|
|
} |
|
|
|
|
|
|
|
function get_artcode { |
|
|
|
release=$(git ls-remote --tags --sort="v:refname" \ |
|
|
|
https://git.artcode.re/$REPO_NAME | |
|
|
|
tail -n1 | cut -f2 | cut -d '/' -f3) |
|
|
|
echo $release |
|
|
|
git ls-remote --tags --sort="v:refname" "https://git.artcode.re/$REPO_NAME" | tail -n1 | cut -f2 | cut -d '/' -f3 |
|
|
|
} |
|
|
|
|
|
|
|
[[ $# -ne 2 ]] && usage |
|
|
|