cabextract: keep old symlink behaviour
Implemented additional checks to keep the old symlink behaviour when using cabextract >= 1.10.
This commit is contained in:
parent
590a19f6de
commit
4173a79279
12
convert.sh
12
convert.sh
@ -374,6 +374,10 @@ function errorHandler() {
|
||||
fi
|
||||
}
|
||||
|
||||
function version() {
|
||||
echo "$@" | awk -F. '{ printf("%d%03d%03d%03d\n", $1,$2,$3,$4); }'
|
||||
}
|
||||
|
||||
if [ -e ISODIR ]; then
|
||||
rm -rf ISODIR
|
||||
fi
|
||||
@ -418,12 +422,18 @@ if [ $runVirtualEditions -eq 1 ] && [ "$VIRTUAL_EDITIONS_PLUGIN_LOADED" != "1" ]
|
||||
fi
|
||||
|
||||
echo ""
|
||||
cabextractVersion=$(cabextract --version | cut -d ' ' -f 3)
|
||||
if [ $(version $cabextractVersion) -ge $(version "1.10") ] ; then
|
||||
keepSymlinks="-k"
|
||||
else
|
||||
keepSymlinks=""
|
||||
fi
|
||||
for file in `find "$uupDir" -type f -iname "*.cab" -not -iname "*windows1*-kb*.cab" -not -iname "ssu-*.cab" -not -iname "*desktopdeployment*.cab" -not -iname "*aggregatedmetadata*.cab"`; do
|
||||
fileName=`basename $file .cab`
|
||||
echo -e "$infoColor""CAB -> ESD:""$resetColor"" $fileName"
|
||||
|
||||
mkdir "$extractDir"
|
||||
cabextract -d "$extractDir" "$file" >/dev/null 2>/dev/null
|
||||
cabextract "$keepSymlinks" -d "$extractDir" "$file" >/dev/null 2>/dev/null
|
||||
errorHandler $? "Failed to extract $fileName.cab"
|
||||
|
||||
wimlib-imagex capture "$extractDir" "$tempDir/$fileName.esd" \
|
||||
|
Loading…
Reference in New Issue
Block a user