1)Mi dice che non trova la cartelle /tmp va creata per lo shell bash, vabene ma dove la creo
2)Mi dice che non trova la iso pero riesce a trovare le patch che stanno entrambi sulla cartella principale dove si trova patch-win32-script.
Posto qui di seguito l'output uscito nel prompt:
- Code: Select all
Untarring patch
Splitting files because xdelta does not support >2GB files
Getting size...
stat: cannot stat `../Gentoo-RR4-2.60.4.iso': No such file or directory
./patch-win32-script.sh: line 34: let: file_size=/4: syntax error: operand expec
ted (error token is "/4")
split: ../Gentoo-RR4-2.60.4.iso: invalid number of bytes
Try `split --help' for more information.
File splitted in:
../Gentoo-RR4-2.60.4.iso.000,
../Gentoo-RR4-2.60.4.iso.001,
../Gentoo-RR4-2.60.4.iso.002 and
../Gentoo-RR4-2.60.4.iso.003
Applying patch to file
Gentoo-RR4-2.60.4.iso.000
xdelta.exe: open ../Gentoo-RR4-2.60.4.iso.000 failed: No such file or directory
Applying patch to file
Gentoo-RR4-2.60.4.iso.001
xdelta.exe: open ../Gentoo-RR4-2.60.4.iso.001 failed: No such file or directory
Applying patch to file
Gentoo-RR4-2.60.4.iso.002
xdelta.exe: open ../Gentoo-RR4-2.60.4.iso.002 failed: No such file or directory
Applying patch to file
Gentoo-RR4-2.60.4.iso.003
xdelta.exe: open ../Gentoo-RR4-2.60.4.iso.003 failed: No such file or directory
Merging files Gentoo-RR4-2.60.4.iso.000, Gentoo-RR4-2.60.4.iso.001, Gentoo-RR4-
2.60.4.iso.002, Gentoo-RR4-2.60.4.iso.003
./patch-win32-script.sh: line 77: ../: Is a directory
Removing files...
Done. New file is . Burn it !
rm: unrecognized option `--rf'
Try `rm --help' for more information.
Qui di seguito il file patch-iso presente nel pachetto win32patcher:
- Code: Select all
#!bash
./patch-win32-script.sh Gentoo-RR4-2.60.4.iso 2.60.4-to-2.65-0 2.60.4-to-2.65-1 2.60.4-to-2.65-2 2.60.4-to-2.65-3
mv ../2.60.4-to-2.65.tar.bz2 .
rm ../2.60.4-* -rf
mv ./2.60.4-to-2.65.tar.bz2 ../
rm ../delta -rf
rm ../patch-iso -rf
rm ../README --rf
rm ../patch-script.sh -rf
E il file patch-win32-iso:
- Code: Select all
#!bash
if [ -z "$1" ] && [ -z "$2" ] && [ -z "$3" ] && [ -z "$4" ] && [ -z "$5" ] && [ -z "$6" ]; then
echo "Please specify the original file and patch. Follow the example."
echo "./patch-win32-script.sh [ISO Image] [Patch file 1] [Patch file 2] [Patch file 3] [Patch file 4] [Output ISO Filename]"
exit 1
fi
patchfile="2.60.4-to-2.65.tar.bz2"
patchdir="2.60.4-to-2.65"
isofilename=$6
file_gentoo=$1
patch_gentoo1=$2
patch_gentoo2=$3
patch_gentoo3=$4
patch_gentoo4=$5
# END OF VARIABLES
echo
echo "Untarring patch"
tar xjf ../$patchfile -C ../
mv ../$patchdir/* ../ -f
echo
echo
echo "Splitting files because xdelta does not support >2GB files"
echo "Getting size..."
file_size=$(stat ../$1 --format=%s)
# Divide by 4
division=4
let file_size=$file_size/$division
# Size is in bytes
#file_size=$( echo $file_size"b")
echo $file_size
split -d -b $file_size ../$1 $( echo ../$1".0")
echo
echo "File splitted in: "
echo ../$1".000,"
echo ../$1".001, "
echo ../$1".002 and "
echo ../$1".003 "
echo
echo "Applying patch to file "
echo $1".000"
# include xdelta bin and lib here statically
xdelta patch ../$2 ../$1".000" ../patched.001
echo
echo "Applying patch to file "
echo $1".001"
# include xdelta bin and lib here statically
xdelta patch ../$3 ../$1".001" ../patched.002
echo
echo "Applying patch to file "
echo $1".002"
# include xdelta bin and lib here statically
xdelta patch ../$4 ../$1".002" ../patched.003
echo
echo "Applying patch to file "
echo $1".003"
# include xdelta bin and lib here statically
xdelta patch ../$5 ../$1".003" ../patched.004
echo
echo "Merging files " $1".000, "$1".001, "$1".002, "$1".003"
cat ../patched.* > ../$isofilename
echo
echo
echo "Removing files..."
rm ../$1".000" -rf
rm ../$1".001" -rf
rm ../$1".002" -rf
rm ../$1".003" -rf
rm ../patched.* -rf
echo "Done. New file is $isofilename . Burn it !"
