getpkg/whatsdirty/publish.sh
Your Name 4e0c476ccb
All checks were successful
Build-Test-Publish / build (push) Successful in 20s
'Generic Commit'
2025-06-22 10:25:51 +12:00

31 lines
794 B
Bash
Executable File

#!/bin/bash
set -euo pipefail
function die() {
echo "FATAL:"
echo "$@"
exit 1
}
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
SOS="${SCRIPT_DIR}/../sos/sos"
[ -f "${SOS}" ] || die "Failed to find sos"
GETPKG="${SCRIPT_DIR}/../getpkg/output/getpkg"
[ -f "${GETPKG}" ] || die "Failed to find getpkg"
# run sos to upload
"${SOS}" upload "getbin.xyz" "${SCRIPT_DIR}/whatsdirty.sh" "whatsdirty:latest"
"${SOS}" upload "getbin.xyz" "${SCRIPT_DIR}/install.sh" "whatsdirty-install:latest"
# publish the tool
mkdir -p "${SCRIPT_DIR}/tool"
cp "${SCRIPT_DIR}/whatsdirty.sh" "${SCRIPT_DIR}/tool"
ln -s "${SCRIPT_DIR}/tool/whatsdirty.sh" "${SCRIPT_DIR}/tool/whatsdirty"
# publish universal tool.
#"${GETPKG}" publish "${SCRIPT_DIR}/tool" "whatsdirty"