diff --git a/README.md b/README.md index a6c6200..59993a4 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,9 @@ TODO: 1. Make & test creategroups script < TO BE AIRED > -2. Test mirror script -3. Test update script -4. Test adding more groups after, then running set up script again -5. Test setcron script again after adding new groups -6. Verify folder structure matches the one listed in this README +2. Test update script +3. Test adding more groups after, then running set up script again +4. Test setcron script again after adding new groups +5. Verify folder structure matches the one listed in this README # Prerequisites diff --git a/setup b/setup index 3527014..e1c0722 100644 --- a/setup +++ b/setup @@ -54,14 +54,14 @@ EOF chmod u+x setcron # Generate gitlab-mirror dependancy updater script. -cat > update < update <<'EOF' #!/bin/bash # Source config file . ./setup.conf for group in "${groupArray[@]}"; do -git pull $gitmirrorsRepo ~/$projectLocation/mirrormanagement/$group +(cd ~/$projectLocation/mirrormanagement/$group && git pull) 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 -i "37s/.*/gitlab_namespace=\"${group}\"/" ~/$projectLocation/mirrormanagement/$group/config.sh