rosa-build/bin/mount_downloads.sh

22 lines
559 B
Bash
Raw Normal View History

#!/bin/bash
for f in `ls /srv/rosa_build/shared/downloads`
do
2012-01-23 13:05:55 +00:00
if [ -d /home/share ]
2012-01-26 19:30:12 +00:00
then
2012-01-23 13:05:55 +00:00
# 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
2012-01-26 19:30:12 +00:00
done