Don't try to mirror debian repos
This commit is contained in:
parent
5b1f985d55
commit
660503b43a
|
@ -156,30 +156,32 @@ function sync_trove_repos {
|
||||||
for line in "${REPOS[@]}"
|
for line in "${REPOS[@]}"
|
||||||
do
|
do
|
||||||
repo_name=$(echo "$line" | awk -F '=' '{print $1}')
|
repo_name=$(echo "$line" | awk -F '=' '{print $1}')
|
||||||
repo_url=$(echo "$line" | awk -F '=' '{print $2}' | awk -F '"' '{print $2}')
|
if [[ ${repo_name} != *".debian."* ]]; then
|
||||||
trove_name=$(echo "$repo_name" | sed "s|_REPO||g" | awk '{print tolower($0)}')
|
repo_url=$(echo "$line" | awk -F '=' '{print $2}' | awk -F '"' '{print $2}')
|
||||||
if [[ $NEW_TROVE == 'yes' ]]; then
|
trove_name=$(echo "$repo_name" | sed "s|_REPO||g" | awk '{print tolower($0)}')
|
||||||
if [ -d /home/trove/${trove_name} ]; then
|
if [[ $NEW_TROVE == 'yes' ]]; then
|
||||||
rm -rf /home/trove/${trove_name}
|
if [ -d /home/trove/${trove_name} ]; then
|
||||||
|
rm -rf /home/trove/${trove_name}
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
|
||||||
if [ ! -d /home/trove/${trove_name} ]; then
|
|
||||||
if [[ ${repo_url} != 'ssh:'* ]]; then
|
|
||||||
git clone --mirror ${repo_url} /home/trove/${trove_name}
|
|
||||||
else
|
|
||||||
sshpass -p "$FRIENDS_TROVE_PASSWORD" git clone --mirror ${repo_url} /home/trove/${trove_name}
|
|
||||||
fi
|
|
||||||
if [ ! -d /home/trove/${trove_name} ]; then
|
if [ ! -d /home/trove/${trove_name} ]; then
|
||||||
echo $"WARNING: failed to mirror repo ${repo_url}"
|
if [[ ${repo_url} != 'ssh:'* ]]; then
|
||||||
|
git clone --mirror ${repo_url} /home/trove/${trove_name}
|
||||||
|
else
|
||||||
|
sshpass -p "$FRIENDS_TROVE_PASSWORD" git clone --mirror ${repo_url} /home/trove/${trove_name}
|
||||||
|
fi
|
||||||
|
if [ ! -d /home/trove/${trove_name} ]; then
|
||||||
|
echo $"WARNING: failed to mirror repo ${repo_url}"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
cd /home/trove/${trove_name}
|
||||||
|
git remote set-url origin ${repo_url}
|
||||||
|
if [[ ${repo_url} != 'ssh:'* ]]; then
|
||||||
|
git fetch -p origin
|
||||||
|
else
|
||||||
|
sshpass -p "$FRIENDS_TROVE_PASSWORD" git fetch -p origin
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
else
|
|
||||||
cd /home/trove/${trove_name}
|
|
||||||
git remote set-url origin ${repo_url}
|
|
||||||
if [[ ${repo_url} != 'ssh:'* ]]; then
|
|
||||||
git fetch -p origin
|
|
||||||
else
|
|
||||||
sshpass -p "$FRIENDS_TROVE_PASSWORD" git fetch -p origin
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
chown -R trove:trove /home/trove
|
chown -R trove:trove /home/trove
|
||||||
|
|
Loading…
Reference in New Issue