mirror of
https://gitlab.com/jarylc/docker-duoauthproxy.git
synced 2026-02-08 12:04:17 +00:00
Initial commit
This commit is contained in:
24
check.sh
Executable file
24
check.sh
Executable file
@@ -0,0 +1,24 @@
|
||||
#!/bin/bash
|
||||
|
||||
apk add curl jq
|
||||
|
||||
[[ ! -f EXISTING ]] || touch EXISTING
|
||||
EXISTING=$(cat EXISTING)
|
||||
echo "Existing: ${EXISTING}"
|
||||
|
||||
if [[ -n $OVERWRITE ]]; then
|
||||
echo "Overwriting: $OVERWRITE"
|
||||
LATEST=$OVERWRITE
|
||||
else
|
||||
INFO=$(curl https://duo.com/docs/checksums | grep 'https://dl.duosecurity.com/duoauthproxy' | grep 'src.tgz' | rev | cut -d'>' -f1 | rev)
|
||||
CHECKSUM=$(echo "$INFO" | cut -d' ' -f1)
|
||||
LATEST=$(echo "$INFO" | cut -d'-' -f2)
|
||||
echo "Latest: ${LATEST}"
|
||||
fi
|
||||
|
||||
if [[ (-n "${LATEST}" && "${LATEST}" != "${EXISTING}") ]]; then
|
||||
mv build.template.yml build.yml
|
||||
sed -i "s \$CHECKSUM ${CHECKSUM} g" 'build.yml'
|
||||
sed -i "s \$LATEST ${LATEST} g" 'build.yml'
|
||||
echo "Building..."
|
||||
fi
|
||||
Reference in New Issue
Block a user