Add sync and correct cp while
This commit is contained in:
parent
89036e3383
commit
191c9e0818
@ -291,18 +291,19 @@ cp $SELECT_ISO ./ &
|
|||||||
export CPPID=$!
|
export CPPID=$!
|
||||||
DEST_SIZE=0
|
DEST_SIZE=0
|
||||||
DEST_FILE=./"`basename $SELECT_ISO`"
|
DEST_FILE=./"`basename $SELECT_ISO`"
|
||||||
CPSTATE=`ps $CPPID | grep "cp"`
|
ps $CPPID >/dev/null
|
||||||
while [ "$CPSTATE" != "" ]; do
|
while [ $? -eq 0 ]; do
|
||||||
if [ -e $DEST_FILE ]; then
|
if [ -e $DEST_FILE ]; then
|
||||||
DEST_SIZE=$(stat -c %s $DEST_FILE)
|
DEST_SIZE=$(stat -c %s $DEST_FILE)
|
||||||
percentuale=$((45 + ( 50 * $DEST_SIZE ) / $ORIG_SIZE ))
|
percentuale=$((45 + ( 50 * $DEST_SIZE ) / $ORIG_SIZE ))
|
||||||
set_pbar $percentuale
|
set_pbar $percentuale
|
||||||
fi
|
fi
|
||||||
sleep 2
|
sleep 2
|
||||||
CPSTATE=`ps $CPPID | grep "cp"`
|
ps $CPPID >/dev/null
|
||||||
done
|
done
|
||||||
ln -fs `basename $SELECT_ISO` ./openmamba-live.iso
|
ln -fs `basename $SELECT_ISO` ./openmamba-live.iso
|
||||||
popd >/dev/null
|
popd >/dev/null
|
||||||
|
sync
|
||||||
set_pbar 98
|
set_pbar 98
|
||||||
|
|
||||||
set_status "Smonto la chiavetta"
|
set_status "Smonto la chiavetta"
|
||||||
|
Loading…
Reference in New Issue
Block a user