Skip to content

Commit

Permalink
Updated uncramfs_all to not overwrite existing cramfs-root directories.
Browse files Browse the repository at this point in the history
git-svn-id: http://firmware-mod-kit.googlecode.com/svn/trunk@392 5c1471b0-2a1b-0410-b4f4-f33460ac40b9
  • Loading branch information
heffnercj committed Mar 28, 2013
1 parent 0268bbd commit 0e027bd
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion uncramfs_all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,14 @@ fi
if [ "$ROOTFS" == "" ]
then
ROOTFS="./cramfs-root"
BDIR=$ROOTFS
I=1

while [ -e $ROOTFS ]
do
ROOTFS=$BDIR-$I
((I=$I+1))
done
fi

FSIMG=$(readlink -f $FSIMG)
Expand All @@ -51,7 +59,7 @@ fi
if [ -e "$FSIMG.le" ]
then
# If this is an OpenRG firmware, try uncramfs-lzma first.
if [ "$(strings $FSIMG.le | grep openrg)" != "" ]
if [ "$(strings "$FSIMG.le" | grep openrg)" != "" ]
then
./src/uncramfs-lzma/uncramfs-lzma "$ROOTFS" "$FSIMG.le" 2>/dev/null
if [ $? -eq 0 ]
Expand Down

0 comments on commit 0e027bd

Please sign in to comment.