From 28aa527494188f9e33f94c7f094a0b58c22adb08 Mon Sep 17 00:00:00 2001 From: sparklyballs Date: Tue, 6 Jun 2017 02:59:04 +0100 Subject: [PATCH] add page 4 to script and set linuxserver as default repo user --- root/defaults/script.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/root/defaults/script.sh b/root/defaults/script.sh index c6041c0..b026c4d 100644 --- a/root/defaults/script.sh +++ b/root/defaults/script.sh @@ -4,7 +4,7 @@ unset FOLDER_DATE FOLDER_MAKE REPO_USER FOLDER_DATE=$(date '+%d-%b-%Y') FOLDER_MAKE="/backup/${FOLDER_DATE}" -REPO_USER="" +REPO_USER=${REPO_USER:-linuxserver} # delete folders older than 20 days for i in $(find /backup/ -maxdepth 1 -type d -mtime +20 -print); do echo -e "Deleting directory $i";rm -rf $i; done @@ -20,6 +20,7 @@ cd "${FOLDER_MAKE}" curl -s "https://api.github.com/users/${REPO_USER}/repos?page=1&per_page=100" | python -c $'import json, sys, os\nfor repo in json.load(sys.stdin): os.system("git clone " + repo["clone_url"])' curl -s "https://api.github.com/users/${REPO_USER}/repos?page=2&per_page=100" | python -c $'import json, sys, os\nfor repo in json.load(sys.stdin): os.system("git clone " + repo["clone_url"])' curl -s "https://api.github.com/users/${REPO_USER}/repos?page=3&per_page=100" | python -c $'import json, sys, os\nfor repo in json.load(sys.stdin): os.system("git clone " + repo["clone_url"])' +curl -s "https://api.github.com/users/${REPO_USER}/repos?page=4&per_page=100" | python -c $'import json, sys, os\nfor repo in json.load(sys.stdin): os.system("git clone " + repo["clone_url"])' # permissions chown -R abc:abc "${FOLDER_MAKE}"