Browse Source

quick fix error -1

main
pvincent 8 months ago
parent
commit
0483644f7f
  1. 2
      tools/wget_release
  2. 14
      tools/wget_semver

2
tools/wget_release

@ -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 {

14
tools/wget_semver

@ -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

Loading…
Cancel
Save