home · contact · privacy
Merge branch 'master' of plomlompom.com:/var/repos/config master
authorChristian Heller <c.heller@plomlompom.de>
Wed, 5 Mar 2025 18:59:45 +0000 (19:59 +0100)
committerChristian Heller <c.heller@plomlompom.de>
Wed, 5 Mar 2025 18:59:45 +0000 (19:59 +0100)
1  2 
testing/scripts/setup_secrets_user.sh

index f2cd5b229be7cf2c919652d4407166e71c1a99cd,07b60cd5c69f694d3b6603060996b62dbfd66b93..007ee49d30f4039a00be6d7228316f18291e8737
@@@ -35,29 -28,5 +35,29 @@@ ssh-keyscan "${REPOS_SITE_DOMAIN}" >> "
  mkdir "${PATH_REPOS}"
  cd "${PATH_REPOS}"
  ssh ${REPOS_SITE_LOGIN} "cd $REMOTE_PATH_REPOS && ls -1" | while read REPO_NAME; do
-     git clone "${REPOS_SITE_LOGIN}:${REMOTE_PATH_REPOS}/${REPO_NAME}"
+     git clone --recurse "${REPOS_SITE_LOGIN}:${REMOTE_PATH_REPOS}/${REPO_NAME}"
  done
 +
 +echo "Set up borg and pull in ~/org"
 +mkdir "${PATH_BORGKEYS}"
 +tar xf "${PATH_SECRETS}/borg_keyfiles.tar" -C "${PATH_BORGKEYS}"
 +ls -1 "${PATH_BORGKEYS}/" | while read FILENAME; do
 +    SERVER_NAME=$(echo "${FILENAME}" | sed 's/.*@//')
 +    ssh-keyscan "${SERVER_NAME}" >> "${PATH_KNOWN_HOSTS}"
 +done
 +while true; do
 +    set +e
 +    "${NAME_BORGAPP}" orgpull
 +    RESULT=$?
 +    set -e
 +    if [ "${RESULT}" = "0" ]; then
 +        break
 +    elif [ "${RESULT}" != "2" ]; then
 +        echo "Aborting due to unexpected ${NAME_BORGAPP} error."
 +      exit 1
 +    fi
 +done
 +
 +PATH_REL_DEL_REPO="DELETE_${PATH_REL_REPO}"
 +mv "${HOME}/${PATH_REL_REPO}" "${HOME}/${PATH_REL_DEL_REPO}"
 +echo "With ~/repos set up, new reference be ~/repos/${PATH_REL_REPO}; moved ~/${PATH_REL_REPO} to ~/${PATH_REL_DEL_REPO}, ready to be deleted by you."