mirror of
https://github.com/endeavouros-team/eos-pkgbuild-setup.git
synced 2026-06-13 01:54:36 +00:00
31 lines
593 B
Bash
Executable File
31 lines
593 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# Show names of all github release assets.
|
|
#
|
|
# Return value is 0 on success, 1 on failure.
|
|
|
|
DIE() {
|
|
local progname="$(/usr/bin/basename "$0")"
|
|
echo "$progname: error: $1" >&2
|
|
exit 1
|
|
}
|
|
|
|
Main() {
|
|
local tag="$1" # tag name for the release assets
|
|
local retval=0
|
|
local out=""
|
|
|
|
[ -n "$tag" ] || DIE "please give the release tag name!"
|
|
|
|
out=$(/usr/bin/hub release show -f %as%n "$tag")
|
|
if [ -n "$out" ] ; then
|
|
echo "$out" | /usr/bin/sed -e 's|^.*/||' -e 's|[ \t]*$||'
|
|
else
|
|
retval=1
|
|
fi
|
|
|
|
return $retval
|
|
}
|
|
|
|
Main "$@"
|