mirror of
https://github.com/clearlinux/swupd-server.git
synced 2026-09-05 21:21:34 +00:00
Also, make some of the variables overridable in the environment. Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
22 lines
818 B
Bash
Executable File
22 lines
818 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# Update content is created and output into the www directory, but the
|
|
# published "latest" version number is only bumped in
|
|
# www/version/formatstaging/latest. This enables QA on devices whose update
|
|
# client is set to query the www/version/formatstaging/latest. Once that
|
|
# QA is complete, this publish script is run to bump the production
|
|
# format's "latest" version number.
|
|
|
|
if [[ $# < 1 ]]; then
|
|
echo "First argument must be a format number"
|
|
echo "$0 aborting"
|
|
exit 1
|
|
fi
|
|
FORMAT=$1
|
|
UPDATEDIR=${UPDATEDIR:-"/var/lib/update"}
|
|
|
|
ver1=`cat ${UPDATEDIR}/www/version/formatstaging/latest`
|
|
ver2=`cat ${UPDATEDIR}/www/version/format$FORMAT/latest`
|
|
cp ${UPDATEDIR}/www/version/formatstaging/latest ${UPDATEDIR}/www/version/format$FORMAT/latest
|
|
echo "Updated from $ver2 to $ver1 in format $FORMAT"
|