Last active
October 20, 2019 12:52
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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