28 lines
797 B
Bash
28 lines
797 B
Bash
|
|
#!/usr/bin/env bash
|
||
|
|
set -euo pipefail
|
||
|
|
|
||
|
|
if [[ $# -ne 1 ]]; then
|
||
|
|
echo "Usage: $0 /path/to/server-linux-x86_64" >&2
|
||
|
|
exit 2
|
||
|
|
fi
|
||
|
|
|
||
|
|
source_dir="${1%/}"
|
||
|
|
repository_dir="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")/.." && pwd)"
|
||
|
|
destination_dir="${repository_dir}/dist"
|
||
|
|
|
||
|
|
for filename in NETfishingServer.x86_64 NETfishingServer.pck; do
|
||
|
|
if [[ ! -f "${source_dir}/${filename}" ]]; then
|
||
|
|
echo "Missing ${source_dir}/${filename}" >&2
|
||
|
|
exit 1
|
||
|
|
fi
|
||
|
|
done
|
||
|
|
|
||
|
|
install -m 0755 "${source_dir}/NETfishingServer.x86_64" \
|
||
|
|
"${destination_dir}/NETfishingServer.x86_64"
|
||
|
|
install -m 0644 "${source_dir}/NETfishingServer.pck" \
|
||
|
|
"${destination_dir}/NETfishingServer.pck"
|
||
|
|
|
||
|
|
cd -- "${destination_dir}"
|
||
|
|
sha256sum NETfishingServer.x86_64 NETfishingServer.pck > SHA256SUMS
|
||
|
|
echo "Staged dedicated server build in ${destination_dir}"
|