mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2024-12-20 21:43:08 +00:00
39 lines
703 B
Bash
Executable File
39 lines
703 B
Bash
Executable File
#!/bin/bash
|
|
set -euo pipefail
|
|
IFS=$'\n\t'
|
|
|
|
ZT_NAME="$1" ; shift
|
|
DISTRO="$1" ; shift
|
|
ZT_ISA="$1" ; shift
|
|
VERSION="$1" ; shift
|
|
BUILD_EVENT="$1" ; shift
|
|
|
|
source "$(dirname $0)/lib.sh"
|
|
|
|
if [ ${BUILD_EVENT} == "tag" ]; then
|
|
CHANNEL="zerotier-releases"
|
|
else
|
|
CHANNEL="zerotier-builds"
|
|
fi
|
|
|
|
function publish_rpm {
|
|
mkdir -p /${CHANNEL}/${DISTRO}
|
|
ls -la /${CHANNEL}
|
|
ls -la .
|
|
cp -a ${ZT_NAME} /${CHANNEL}/${DISTRO}
|
|
}
|
|
|
|
function publish_deb {
|
|
mkdir -p /${CHANNEL}/${DISTRO}/pool/dists/${ZT_NAME}/main
|
|
cp -a ${ZT_NAME}/* /${CHANNEL}/${DISTRO}/pool/dists/${ZT_NAME}/main
|
|
}
|
|
|
|
case ${PKGFMT} in
|
|
"rpm")
|
|
publish_rpm
|
|
;;
|
|
"deb")
|
|
publish_deb
|
|
esac
|
|
|