feat: Update 4 files
This commit is contained in:
@@ -6,6 +6,7 @@ SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
|
||||
ARCH=$(uname -m)
|
||||
PROJECT="$(basename "${SCRIPT_DIR}")"
|
||||
OUTPUT="${SCRIPT_DIR}/output"
|
||||
VERSION=$(date -u +"%Y.%m%d.%H%M")
|
||||
|
||||
function heading() {
|
||||
echo "--------------------------------"
|
||||
@@ -30,10 +31,16 @@ mkdir -p "${OUTPUT}"
|
||||
#--------------------------------------------------------------------------------
|
||||
heading "Building ${PROJECT}"
|
||||
|
||||
# Replace __VERSION__ in the source file before building
|
||||
sed -i "s|__VERSION__|${VERSION}|g" "${SCRIPT_DIR}/dshash/main.cpp"
|
||||
|
||||
# build release version
|
||||
"${SCRIPT_DIR}/build.sh"
|
||||
[ -f "${OUTPUT}/${PROJECT}" ] || die "Build failed."
|
||||
|
||||
# Restore the placeholder for future builds
|
||||
sed -i "s|${VERSION}|__VERSION__|g" "${SCRIPT_DIR}/dshash/main.cpp"
|
||||
|
||||
# install getpkg
|
||||
GETPKG_PATH="${HOME}/.local/bin/getpkg/getpkg"
|
||||
if [ ! -f "${GETPKG_PATH}" ]; then
|
||||
|
Reference in New Issue
Block a user