diff --git a/bin/mount_downloads.sh b/bin/mount_downloads.sh index 6bb68f669..13c7b8d02 100755 --- a/bin/mount_downloads.sh +++ b/bin/mount_downloads.sh @@ -2,9 +2,19 @@ for f in `ls /srv/rosa_build/shared/downloads` do - if [ -d /home/share/platforms/$f ] - then - sudo umount /srv/rosa_build/shared/downloads/$f 2>&1 >> /dev/null - sudo mount --bind /home/share/platforms/$f /srv/rosa_build/shared/downloads/$f - fi -done + if [ -d /home/share ] + # Staging case + if [ -d /home/share/platforms/$f ] + then + sudo umount /srv/rosa_build/shared/downloads/$f 2>&1 >> /dev/null + sudo mount --bind /home/share/platforms/$f /srv/rosa_build/shared/downloads/$f + fi + else + # Production case + if [ -d /share/platforms/$f ] + then + sudo umount /srv/rosa_build/shared/downloads/$f 2>&1 >> /dev/null + sudo mount --bind /share/platforms/$f /srv/rosa_build/shared/downloads/$f + fi + fi +done \ No newline at end of file