Skip to content

Instantly share code, notes, and snippets.

@mgurov
Last active September 26, 2018 14:44
Show Gist options
  • Save mgurov/7978db50f4c0f2f729ec3daf7da43bef to your computer and use it in GitHub Desktop.
Save mgurov/7978db50f4c0f2f729ec3daf7da43bef to your computer and use it in GitHub Desktop.
#!/bin/bash -eux
shopt -s nullglob
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
while true; do
files=( x* )
if (( ${#files[@]} )); then
echo file found: $files
cat $files | ${DIR}/republish --env=pro > out.$files && mv $files done.$files
sleep 5
else
echo no files left
sleep 15
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment