tools: Fix for $LOGNAME missing in Ubuntu 11.10, using $USER instead

Change-Id: I824fc6ca27c2a2308e977a14585afc6dd4996f56
diff --git a/tools/leoupdate b/tools/leoupdate
index 4ed5348..8f43b8d 100755
--- a/tools/leoupdate
+++ b/tools/leoupdate
@@ -6,7 +6,7 @@
 
 cd "$LOC"/temp
 echo "extract update.zip"
-unzip -o -qq  "$LOC"/$TARGET_PRODUCT-ota-$TARGET_BUILD_VARIANT.$LOGNAME.zip
+unzip -o -qq  "$LOC"/$TARGET_PRODUCT-ota-$TARGET_BUILD_VARIANT.$USER.zip
 
 echo "Making Leo Compatible Update script"
 cd "$LOC"
@@ -22,8 +22,8 @@
 rm -rf "$LOC"/temp/boot.img
 rm -rf "$LOC"/temp/boot
 cp -a "$LOC"/boot "$LOC"/temp/boot
-rm -rf "$LOC"/$TARGET_PRODUCT-ota-$TARGET_BUILD_VARIANT.$LOGNAME.zip
-zip -9yr "$LOC"/$TARGET_PRODUCT-ota-$TARGET_BUILD_VARIANT.$LOGNAME.zip * > /dev/null
+rm -rf "$LOC"/$TARGET_PRODUCT-ota-$TARGET_BUILD_VARIANT.$USER.zip
+zip -9yr "$LOC"/$TARGET_PRODUCT-ota-$TARGET_BUILD_VARIANT.$USER.zip * > /dev/null
 cd "$LOC"
 
 echo Cleanup...
diff --git a/tools/opticharger b/tools/opticharger
index 203fd2b..f8a9d8a 100755
--- a/tools/opticharger
+++ b/tools/opticharger
@@ -25,7 +25,7 @@
 
 if [ "$APKCERTS" = "" ];
 then
-    APKCERTS=$OUT/obj/PACKAGING/target_files_intermediates/$TARGET_PRODUCT-target_files-$TARGET_BUILD_VARIANT.$LOGNAME/META/apkcerts.txt
+    APKCERTS=$OUT/obj/PACKAGING/target_files_intermediates/$TARGET_PRODUCT-target_files-$TARGET_BUILD_VARIANT.$USER/META/apkcerts.txt
     if [ ! -f "$APKCERTS" ];
     then
         echo "Set APKCERTS to the path to your apkcerts.txt file"
diff --git a/tools/squisher b/tools/squisher
index 61a3663..c82443f 100755
--- a/tools/squisher
+++ b/tools/squisher
@@ -24,9 +24,9 @@
 fi
 
 if [ "$TARGET_BUILD_TYPE" = "debug" ]; then
-    OTAPACKAGE=$OUT/${TARGET_PRODUCT}_debug-ota-$TARGET_BUILD_VARIANT.$LOGNAME.zip
+    OTAPACKAGE=$OUT/${TARGET_PRODUCT}_debug-ota-$TARGET_BUILD_VARIANT.$USER.zip
 else
-    OTAPACKAGE=$OUT/$TARGET_PRODUCT-ota-$TARGET_BUILD_VARIANT.$LOGNAME.zip
+    OTAPACKAGE=$OUT/$TARGET_PRODUCT-ota-$TARGET_BUILD_VARIANT.$USER.zip
 fi
 if [ ! -f "$OTAPACKAGE" ]; then
 	echo "$OTAPACKAGE doesn't exist!";