/usr/bin/simpleburn-extract-iso is in simpleburn 1.6.5-1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | #!/bin/bash
function ddgauge() {
total=$1
shift; filename=$*
ppid=$$
sleep 1
#~ lastpercent=0
while pgrep -P $ppid dd >/dev/null; do
filesize=`ls -l "$filename" | cut -f5 -d' '`
let filesize=filesize/1048576
let percent=(filesize*100)/total
let percent=percent%100
#~ if (( $percent != $lastpercent )); then
echo $percent
#~ lastpercent=$percent
#~ fi
sleep 1
done
}
cdreader=$1
filename=`echo $2 | sed 's/"//g'`
directory=`dirname "$filename"`
mkdir -p "$directory"
if [ ! -b "$cdreader" ]; then
echo "usage: $0 cdreader somefile.iso"
echo "example: $0 /dev/sr0 /home/me/linux.iso"
exit
fi
tracksize=`simpleburn-media-detection $cdreader | grep "mediasize" | cut -f2 -d=`
let blockscount=tracksize/2
let tracksize=tracksize/1024
rm -f "$filename"
dd if=$cdreader bs=2048 count=$blockscount of="$filename" | ddgauge $tracksize $filename
status=${PIPESTATUS[0]}
echo "100"
exit $status
|