diff options
Diffstat (limited to 'scripts/runqemu-extract-sdk')
-rwxr-xr-x | scripts/runqemu-extract-sdk | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/scripts/runqemu-extract-sdk b/scripts/runqemu-extract-sdk index 4b5247597f..509af66216 100755 --- a/scripts/runqemu-extract-sdk +++ b/scripts/runqemu-extract-sdk | |||
@@ -73,15 +73,18 @@ if [ ! -d "$SDK_ROOTFS_DIR" ]; then | |||
73 | mkdir -p "$SDK_ROOTFS_DIR" | 73 | mkdir -p "$SDK_ROOTFS_DIR" |
74 | fi | 74 | fi |
75 | 75 | ||
76 | if [ -e "$SDK_ROOTFS_DIR/var/pseudo" ]; then | 76 | pseudo_state_dir="$SDK_ROOTFS_DIR/../$(basename "$SDK_ROOTFS_DIR").pseudo_state" |
77 | echo "Error: $SDK_ROOTFS_DIR/var/pseudo already exists!" | 77 | |
78 | echo "Please delete the entire rootfs tree manually if this is really what you want" | 78 | if [ -e "$pseudo_state_dir" ]; then |
79 | echo "Error: $pseudo_state_dir already exists!" | ||
80 | echo "Please delete the rootfs tree and pseudo directory manually" | ||
81 | echo "if this is really what you want." | ||
79 | exit 1 | 82 | exit 1 |
80 | fi | 83 | fi |
81 | 84 | ||
82 | mkdir -p "$SDK_ROOTFS_DIR/var/pseudo" | 85 | mkdir -p "$pseudo_state_dir" |
83 | touch "$SDK_ROOTFS_DIR/var/pseudo/pseudo.pid" | 86 | touch "$pseudo_state_dir/pseudo.pid" |
84 | PSEUDO_LOCALSTATEDIR="$SDK_ROOTFS_DIR/var/pseudo" | 87 | PSEUDO_LOCALSTATEDIR="$pseudo_state_dir" |
85 | export PSEUDO_LOCALSTATEDIR | 88 | export PSEUDO_LOCALSTATEDIR |
86 | 89 | ||
87 | echo "Extracting rootfs tarball using pseudo..." | 90 | echo "Extracting rootfs tarball using pseudo..." |