Repository tools

This commit is contained in:
2023-06-21 15:43:22 -04:00
parent 695194cba7
commit b933047304
2 changed files with 49 additions and 0 deletions

34
bin/repo-move.sh Executable file
View File

@ -0,0 +1,34 @@
#!/bin/sh
GITHUB=https://github.com/nprobert
PSTAR=https://www.probestar.com/NTCNA-TP
for i in *
do
echo "$i: "
if [ -d $i ]; then
cd $i
git ls-remote --get-url | grep www.probestar.com
if [ "$?" -eq "0" ]; then
cd ..
continue
fi
cd ..
fi
if [ ! -d $i.git ]; then
git clone --mirror $GITHUB/$i.git
cd $i.git
git remote add new $PSTAR/$i.git
git push --mirror new
cd ..
rm -rf $i.git
fi
if [ -d $i ]; then
cd $i
git remote set-url origin $PSTAR/$i.git
git pull --recurse-submodules
cd ..
else
git clone $PSTAR/$i.git --recursive
fi
done

15
bin/repo-update.sh Executable file
View File

@ -0,0 +1,15 @@
#!/bin/sh
PSTAR=https://www.probestar.com/PStar
for i in *
do
if [ -d $i ]; then
cd $i
git remote set-url origin $PSTAR/$i.git
git pull --recurse-submodules
cd ..
else
git clone $PSTAR/$i.git --recursive
fi
done