Skip to content

Instantly share code, notes, and snippets.

@YasienDwieb
Last active October 20, 2019 12:52
Show Gist options
  • Save YasienDwieb/c03c85ebfb31268b18a17f942e5ff048 to your computer and use it in GitHub Desktop.
Save YasienDwieb/c03c85ebfb31268b18a17f942e5ff048 to your computer and use it in GitHub Desktop.
Bulk iso files maker useful for courses archiving for easy transfer and quick view
#!/bin/bash
if [ -z $2 ]; then
echo $0" <source-dir/> <dist-dir/>"
exit
fi
IFS=$'\n'
SOURCE=$1
DEST=$2
for dir in `ls $SOURCE |rev |cut -d '/' -f1 |rev`;do
if [ -d $SOURCE/$dir ]; then
genisoimage -f -J -joliet-long -r -iso-level 4 -allow-lowercase -allow-multidot -o $DEST'/'$dir.iso $SOURCE'/'$dir
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment