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