diff options
author | Firerat <firer4t@googlemail.com> | 2010-08-25 12:13:08 +0100 |
---|---|---|
committer | Firerat <firer4t@googlemail.com> | 2010-08-25 12:13:08 +0100 |
commit | 1f0e92130bb627779a274fb3865f2d4172a8864c (patch) | |
tree | d3648bb28918e859a6b7324e77dbed47287736fb /prebuilt/common/bin | |
parent | 79ffa51a18a4c714eb114a11915cf71869cdab4a (diff) | |
download | vendor_replicant-1f0e92130bb627779a274fb3865f2d4172a8864c.zip vendor_replicant-1f0e92130bb627779a274fb3865f2d4172a8864c.tar.gz vendor_replicant-1f0e92130bb627779a274fb3865f2d4172a8864c.tar.bz2 |
replaced /system/sd with
Diffstat (limited to 'prebuilt/common/bin')
-rwxr-xr-x | prebuilt/common/bin/fix_permissions | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/prebuilt/common/bin/fix_permissions b/prebuilt/common/bin/fix_permissions index ee4b067..a6db514 100755 --- a/prebuilt/common/bin/fix_permissions +++ b/prebuilt/common/bin/fix_permissions @@ -25,8 +25,8 @@ # v2.02 - ignore com.htc.resources.apk if it exists and minor code cleanups, # fix help text, implement simulated run (-s) [farmatito] # v2.03 - fixed chown group ownership output [Kastro] - -VERSION="2.03" +# v2.04 - replaced /system/sd with $SD_EXT_DIRECTORY [Firerat] +VERSION="2.04" # Defaults DEBUG=0 # Debug off by default @@ -74,7 +74,15 @@ DATAMOUNT=0 SYSSDMOUNT=0 FP_STARTTIME=$( $DATE +"%m-%d-%Y %H:%M:%S" ) FP_STARTEPOCH=$( $DATE +%s ) - +if $TEST "$SD_EXT_DIRECTORY" = ""; then + #check for mount point, /system/sd included in tests for backward compatibility + for MP in /sd-ext /system/sd;do + if $TEST -d $MP; then + SD_EXT_DIRECTORY=$MP + break + fi + done +fi fp_usage() { $ECHO "Usage $0 [OPTIONS] [APK_PATH]" @@ -186,8 +194,8 @@ fp_start() DATAMOUNT=1 fi - if $TEST -e /dev/block/mmcblk0p2 && $TEST $( $GREP -c " /system/sd " "/proc/mounts" ) -eq 0; then - $MOUNT /system/sd > /dev/null 2>&1 + if $TEST -e /dev/block/mmcblk0p2 && $TEST $( $GREP -c " $SD_EXT_DIRECTORY " "/proc/mounts" ) -eq 0; then + $MOUNT $SD_EXT_DIRECTORY > /dev/null 2>&1 SYSSDMOUNT=1 fi fi @@ -445,7 +453,7 @@ fp_end() fi if $TEST $SYSSDMOUNT -eq 1; then - $UMOUNT /system/sd > /dev/null 2>&1 + $UMOUNT $SD_EXT_DIRECTORY > /dev/null 2>&1 fi if $TEST $SYSMOUNT -eq 1; then |