quick fix error -1
This commit is contained in:
+1
-1
@@ -15,7 +15,7 @@ function usage {
|
||||
echo -e '\t# With destination'
|
||||
echo -e "\t$BASECMD artcode libre/libre-gnome /tmp # folder"
|
||||
echo -e "\t$BASECMD artcode libre/libre-gnome /tmp/release.tgz # file"
|
||||
exit -1
|
||||
exit 1
|
||||
}
|
||||
|
||||
function get_github {
|
||||
|
||||
+6
-8
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user