action: GUEST
This commit is contained in:
parent
92222d6caf
commit
4ea7ba3e45
54
action
54
action
|
|
@ -3,30 +3,30 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
function write_output() {
|
function write_output() {
|
||||||
|
. "actions/${OS}"
|
||||||
|
# Load the list of RELEASES
|
||||||
|
RELEASES=$(cut -d: -f1 < "public/tmp_${OS}" | cut -d' ' -f2 | sort -ur | paste -sd ' ')
|
||||||
|
# Check if 'edition' function exists and load it if present
|
||||||
|
if grep -q 'GUEST' "actions/${OS}"; then
|
||||||
|
GUEST=$(printf 'GUEST="%s"\n' "$(grep 'GUEST' < "actions/${OS}" | cut -d'"' -f2)")
|
||||||
|
else
|
||||||
|
GUEST=$(echo -e "\n")
|
||||||
|
fi
|
||||||
|
if grep -q 'IMAGE_TYPE' "actions/${OS}"; then
|
||||||
|
IMAGE_TYPE=$(printf 'IMAGE_TYPE="%s"\n')
|
||||||
|
else
|
||||||
|
IMAGE_TYPE=$(echo -e "\n")
|
||||||
|
fi
|
||||||
|
if grep -q 'function edition' "actions/${OS}"; then
|
||||||
. "actions/${OS}"
|
. "actions/${OS}"
|
||||||
# Load the list of RELEASES
|
EDITIONS=$(printf 'EDITIONS="%s"\n' "$(cut -d: -f1 < "public/tmp_${OS}" | cut -d' ' -f3 | sort -ur | paste -sd ' ')")
|
||||||
RELEASES=$(cut -d: -f1 < "public/tmp_${OS}" | cut -d' ' -f2 | sort -ur | paste -sd ' ')
|
else
|
||||||
# Check if 'edition' function exists and load it if present
|
EDITIONS=$(echo -e "\n")
|
||||||
if grep -q 'GUEST' "actions/${OS}"; then
|
fi
|
||||||
GUEST=$(printf 'GUEST="%s"\n' "$(cut -d: -f1 < "public/tmp_${OS}" | cut -d' ' -f3 | sort -ur | paste -sd ' ')")
|
echo
|
||||||
else
|
REST=$(sed -n '/^function releases_()/,$p' "actions/${OS}")
|
||||||
GUEST=$(echo -e "\n")
|
# Create and save the template with all collected information
|
||||||
fi
|
printf '# Template file for '\''%s'\''
|
||||||
if grep -q 'IMAGE_TYPE' "actions/${OS}"; then
|
|
||||||
IMAGE_TYPE=$(printf 'IMAGE_TYPE="%s"\n')
|
|
||||||
else
|
|
||||||
IMAGE_TYPE=$(echo -e "\n")
|
|
||||||
fi
|
|
||||||
if grep -q 'function edition' "actions/${OS}"; then
|
|
||||||
. "actions/${OS}"
|
|
||||||
EDITIONS=$(printf 'EDITIONS="%s"\n' "$(cut -d: -f1 < "public/tmp_${OS}" | cut -d' ' -f3 | sort -ur | paste -sd ' ')")
|
|
||||||
else
|
|
||||||
EDITIONS=$(echo -e "\n")
|
|
||||||
fi
|
|
||||||
echo
|
|
||||||
REST=$(sed -n '/^function releases_()/,$p' "actions/${OS}")
|
|
||||||
# Create and save the template with all collected information
|
|
||||||
printf '# Template file for '\''%s'\''
|
|
||||||
OSNAME="%s"
|
OSNAME="%s"
|
||||||
PRETTY="%s"
|
PRETTY="%s"
|
||||||
BASEDOF="%s"
|
BASEDOF="%s"
|
||||||
|
|
@ -41,10 +41,10 @@ RELEASES="%s"
|
||||||
%s
|
%s
|
||||||
|
|
||||||
' "$OS" "$OSNAME" "$PRETTY" "$BASEDOF" "$DESCRIPTION" "$HOMEPAGE" "$CREDENTIALS" "$GUEST" "$IMAGE_TYPE" "$RELEASES" "$EDITIONS" "$REST" | tee -a "public/${OS}"
|
' "$OS" "$OSNAME" "$PRETTY" "$BASEDOF" "$DESCRIPTION" "$HOMEPAGE" "$CREDENTIALS" "$GUEST" "$IMAGE_TYPE" "$RELEASES" "$EDITIONS" "$REST" | tee -a "public/${OS}"
|
||||||
# Append content from tmp_${OS} to TODO/all and remove the temporary file
|
# Append content from tmp_${OS} to TODO/all and remove the temporary file
|
||||||
cat "public/tmp_${OS}" >> TODO/all
|
cat "public/tmp_${OS}" >> TODO/all
|
||||||
rm "public/tmp_${OS}"
|
#rm "public/tmp_${OS}"
|
||||||
echo
|
echo
|
||||||
}
|
}
|
||||||
|
|
||||||
function test_result() {
|
function test_result() {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue