Skip to content

Instantly share code, notes, and snippets.

@phorward
Created July 26, 2019 12:30
Show Gist options
  • Save phorward/752c845abe9e128430e95edd7a9c8d9e to your computer and use it in GitHub Desktop.
Save phorward/752c845abe9e128430e95edd7a9c8d9e to your computer and use it in GitHub Desktop.
App Engine Download Scripts
#!/bin/sh
PROBLEMS=""
for project in `gcloud projects list | cut -f 1 -d " "`
do
if [ "$project" == "PROJECT_ID" ]
then
continue
fi
echo "Downloading $project..."
python ~/bin/google-cloud-sdk/platform/google_appengine/appcfg.py download_app -A $project $project
if [ $? -ne 0 ]
then
PROBLEMS="$PROBLEMS $project"
fi
done
echo "---"
echo "$PROBLEMS"
echo "---"
echo "ALL DONE!"
#!/bin/sh
for project in `gcloud projects list | cut -f 1 -d " "`
do
echo "Download von $project starten? (J/n)"
read N
if [ "$N" == "N" -o "$N" == "n" ]
then
continue
fi
while [ 0 ]
do
../google_appengine/appcfg.py download_app -A $project $project
if [ $? -ne 0 ]
then
echo "Da fehlt ein Recht? - Nochmal versuchen? (J/n)"
read N
if [ -z "$N" -o "$N" == "J" -o "$N" == "j" ]
then
continue
fi
fi
break
done
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment