pvincent 9 months ago
parent
commit
147f80beaa
  1. 0
      appended
  2. 4
      tools/erase_lines
  3. 2
      tools/idem_apt_install
  4. 2
      tools/semver_git_tag
  5. 6
      tools/wget_semver

0
appended

4
tools/erase_lines

@ -3,7 +3,7 @@
# Clears the entire current line regardless of terminal size.
# See the magic by running:
# { sleep 1; clear_this_line ; }&
clear_this_line() {
function clear_this_line {
printf '\r'
cols="$(tput cols)"
for i in $(seq "$cols"); do
@ -16,7 +16,7 @@ clear_this_line() {
# Usage: erase_lines [AMOUNT]
# See the magic by running:
# { sleep 1; erase_lines 2; }&
erase_lines() {
function erase_lines {
# Default line count to 1.
test -z "$1" && lines="1" || lines="$1"

2
tools/idem_apt_install

@ -1,6 +1,6 @@
#!/bin/bash
function usage() {
function usage {
local BASECMD
BASECMD=$(basename "$0")
echo "usage: $BASECMD <packages...>"

2
tools/semver_git_tag

@ -1,6 +1,6 @@
#!/bin/bash
function usage() {
function usage {
echo 'usage: --major | -M | --minor | -m | --patch | -p'
exit 1
}

6
tools/wget_semver

@ -3,7 +3,7 @@
REPO_TYPE=$1
REPO_NAME=$2
function usage() {
function usage {
local BASECMD=$(basename "$0")
echo 'usage: <REPO_TYPE> <REPO_NAME> [DESTINATION]'
echo 'example:'
@ -14,7 +14,7 @@ function usage() {
exit -1
}
function get_github() {
function get_github {
local all_releases=$(git ls-remote --tags --sort="v:refname" https://github.com/"$REPO_NAME" | grep -Eo "v?([0-9]+\.){2}[0-9]+$")
# extract only VERSION without 'v'
@ -33,7 +33,7 @@ function get_github() {
fi
}
function get_artcode() {
function get_artcode {
release=$(git ls-remote --tags --sort="v:refname" \
https://git.artcode.re/$REPO_NAME |
tail -n1 | cut -f2 | cut -d '/' -f3)

Loading…
Cancel
Save