|
|
|
@ -17,6 +17,8 @@ set -euo pipefail
|
|
|
|
|
[ -n "${DEBUG:-}" ] && set -x
|
|
|
|
|
srcdir="$(dirname "$0")"
|
|
|
|
|
|
|
|
|
|
git_url="${GIT_URL:-https://github.com}"
|
|
|
|
|
|
|
|
|
|
run(){
|
|
|
|
|
local repofile="$1"
|
|
|
|
|
echo "processing repos from file: $repofile"
|
|
|
|
@ -24,6 +26,9 @@ run(){
|
|
|
|
|
repo_dir="${repo##*:}"
|
|
|
|
|
repo_dir="${repo_dir##*/}"
|
|
|
|
|
repo="${repo%%:*}"
|
|
|
|
|
if ! echo "$repo" | grep -q "/"; then
|
|
|
|
|
repo="HariSekhon/$repo"
|
|
|
|
|
fi
|
|
|
|
|
if [ -d "$repo_dir" ]; then
|
|
|
|
|
pushd "$repo_dir"
|
|
|
|
|
# make update does git pull but if that mechanism is broken then this first git pull will allow the repo to self-fix itself
|
|
|
|
@ -37,7 +42,7 @@ run(){
|
|
|
|
|
fi
|
|
|
|
|
popd
|
|
|
|
|
else
|
|
|
|
|
git clone "https://github.com/harisekhon/$repo" "$repo_dir"
|
|
|
|
|
git clone "$git_url/$repo" "$repo_dir"
|
|
|
|
|
fi
|
|
|
|
|
done < <(sed 's/#.*//; /^[[:space:]]*$/d' < "$repofile")
|
|
|
|
|
}
|
|
|
|
|