Update update script

master
Facinorous 4 years ago
parent 16031ee309
commit 1d91f6da09

@ -1,10 +1,9 @@
TODO: TODO:
1. Make & test creategroups script < TO BE AIRED > 1. Make & test creategroups script < TO BE AIRED >
2. Test mirror script 2. Test update script
3. Test update script 3. Test adding more groups after, then running set up script again
4. Test adding more groups after, then running set up script again 4. Test setcron script again after adding new groups
5. Test setcron script again after adding new groups 5. Verify folder structure matches the one listed in this README
6. Verify folder structure matches the one listed in this README
# Prerequisites # Prerequisites

@ -54,14 +54,14 @@ EOF
chmod u+x setcron chmod u+x setcron
# Generate gitlab-mirror dependancy updater script. # Generate gitlab-mirror dependancy updater script.
cat > update <<EOF cat > update <<'EOF'
#!/bin/bash #!/bin/bash
# Source config file # Source config file
. ./setup.conf . ./setup.conf
for group in "${groupArray[@]}"; do for group in "${groupArray[@]}"; do
git pull $gitmirrorsRepo ~/$projectLocation/mirrormanagement/$group (cd ~/$projectLocation/mirrormanagement/$group && git pull)
chmod 755 ~/$projectLocation/mirrormanagement/$group/*.sh chmod 755 ~/$projectLocation/mirrormanagement/$group/*.sh
sed "10s,.*,user_home=\"/home/${USER}/gitmirrors-bs\"," ~/$projectLocation/mirrormanagement/$group/config.sh.SAMPLE > ~/$projectLocation/mirrormanagement/$group/config.sh sed "10s,.*,user_home=\"/home/${USER}/gitmirrors-bs\"," ~/$projectLocation/mirrormanagement/$group/config.sh.SAMPLE > ~/$projectLocation/mirrormanagement/$group/config.sh
sed -i "37s/.*/gitlab_namespace=\"${group}\"/" ~/$projectLocation/mirrormanagement/$group/config.sh sed -i "37s/.*/gitlab_namespace=\"${group}\"/" ~/$projectLocation/mirrormanagement/$group/config.sh

Loading…
Cancel
Save