#!/usr/bin/env bash set -euo pipefail CLONE_SCRIPT="PackagingForCloudronWorkspace/UpstreamVendor-Clone.sh" EXTRA_REPOS_FILE="PackagingForCloudronWorkspace/REPOS.txt" if [[ ! -f "$CLONE_SCRIPT" ]]; then echo "Missing $CLONE_SCRIPT" >&2 exit 1 fi repo_lines=$(awk '/^https?:\/\//{print $0}' "$CLONE_SCRIPT" | sed 's/#.*$//' | sed -n '/^https:\/\//p') if [[ -f "$EXTRA_REPOS_FILE" ]]; then extra=$(sed -e 's/#.*$//' -e '/^\s*$/d' "$EXTRA_REPOS_FILE" | sed -n '/^https:\/\//p') else extra="" fi all_urls=$(printf "%s\n%s\n" "$repo_lines" "$extra" | sed 's/.git$//' | sort -u) readarray -t urls <<< "$all_urls" now=$(date -Is) cat <