Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 18 additions & 2 deletions worker/uploadiso
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,24 @@ esac

# Check what files we have.
[ -f "$ROS_OUTPUT/bootcd.iso" ] && BOOTCD=1 || BOOTCD=0
[ $UPLOAD_REGTESTCD -a -f "${ROS_OUTPUT}/bootcdregtest.iso" ] && REGTESTCD=1 || REGTESTCD=0
[ -f "$ROS_OUTPUT/livecd.iso" ] && LIVECD=1 || LIVECD=0

if [ $BOOTCD -eq 0 -a $LIVECD -eq 0 ]; then
if [ $BOOTCD -eq 0 -a $REGTESTCD -eq 0 -a $LIVECD -eq 0 ]; then
echo "* There are no ISO files to process."
exit 2
fi

# Rsync them onto the file server.
BOOT=reactos-bootcd-$REVISION_SUFFIX-$UPLOAD_SUFFIX
if [ $REGTESTCD ]; then
REGT=reactos-bootcdregtest-$REVISION_SUFFIX-$UPLOAD_SUFFIX
fi
LIVE=reactos-livecd-$REVISION_SUFFIX-$UPLOAD_SUFFIX

echo "* Rsyncing ISO files onto iso.reactos.org..."
cd $ROS_OUTPUT
rsync --stats -e "ssh -l $UPLOAD_USER -i $UPLOAD_KEY" -rtvz --include=bootcd.iso --include=livecd.iso --exclude=* . $UPLOAD_HOST:$UPLOAD_TEMPDIR || exit 1
rsync --stats -e "ssh -l $UPLOAD_USER -i $UPLOAD_KEY" -rtvz --include=bootcd.iso --include=bootcdregtest.iso --include=livecd.iso --exclude=* . $UPLOAD_HOST:$UPLOAD_TEMPDIR || exit 1
echo -e "* Done.\n"

# Remotely compress them on the file server and update symbolic links.
Expand All @@ -47,6 +51,18 @@ else
echo "* There is no $BOOT to compress."
fi

if [ $REGTESTCD ]; then
echo "* Remotely compressing $REGT..."
ssh $SSHOPTS "ln $UPLOAD_TEMPDIR/bootcdregtest.iso $UPLOAD_TEMPDIR/$REGT.iso"
ssh $SSHOPTS "7za a -bd -t7z $UPLOAD_TEMPDIR/$BOOT.7z $UPLOAD_TEMPDIR/$REGT.iso -mx9 | tail -n +4"
ssh $SSHOPTS "rm $UPLOAD_TEMPDIR/$REGT.iso"
ssh $SSHOPTS "mv $UPLOAD_TEMPDIR/$REGT.7z $UPLOAD_ISODIR/temp/"
ssh $SSHOPTS "chmod 0644 $UPLOAD_ISODIR/temp/$REGT.7z"
#ssh $SSHOPTS "ln -snf $REGT.7z $UPLOAD_ISODIR/temp/latest-$UPLOAD_SUFFIX"
elif [ $UPLOAD_REGTESTCD ]; then
echo "* There is no $REGT to compress."
fi

if [ $LIVECD ]; then
echo "* Remotely compressing $LIVE..."
ssh $SSHOPTS "ln $UPLOAD_TEMPDIR/livecd.iso $UPLOAD_TEMPDIR/$LIVE.iso"
Expand Down