Commit 9e9f8ca8 authored by topjohnwu's avatar topjohnwu

Restore cwd

parent f63af060
......@@ -96,8 +96,10 @@ cpio_mkdir() {
[ -z $1 ] && abort_wrap "This script requires a boot image as a parameter"
cwd=`pwd`
cd "`dirname_wrap $1`"
BOOTIMAGE="`pwd`/`basename_wrap $1`"
cd $cwd
[ -e "$BOOTIMAGE" ] || abort_wrap "$BOOTIMAGE does not exist!"
......@@ -110,7 +112,7 @@ id | grep "uid=0" >/dev/null 2>&1 && ROOT=true || ROOT=false
# Switch to the location of the script file
[ -z $SOURCEDMODE ] && cd "`dirname_wrap "${BASH_SOURCE:-$0}"`"
chmod +x ./*
chmod -R 755 .
##########################################################################################
# Unpack
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment