[Epic 4G Q&A, Help & Troubleshooting] mk4cam:
i currently have the old clockwork 2.5.1.0 and ready to move to ext4 and flash most likely viperrom or srf. the problem im encountering is when i extract the cwm3 zip and click run.sh like instructed it just opens up this with gedit:

#!/bin/bash

platform=`uname`;

adb="./adb";

if [ $(uname -p) == 'powerpc' ]; then

echo "Sorry, this won't work on PowerPC machines."

exit 1

fi

cd "$(dirname "$0")"

echo "Original one click made by joeykrim and one click installer made by noobnl and firon"

echo "busybox by skeeterslint"

read -n1 -s -p "Press any key to continue..."

which adb > /dev/null 2>&1

if [ $? -eq 0 ]; then

adb="./adb";

if [ "$platform" == 'Darwin' ]; then

mv adb.osx $adb > /dev/null 2>&1

fi

fi

chmod +x $adb

echo -e "Starting adb server"

$adb kill-server

which sudo > /dev/null 2>&1

if [ $? -eq 0 ]; then

$adb start-server

else

sudo $adb start-server

if [ $? -ne 0 ]; then

$adb start-server

fi

fi

state=$($adb get-state | tr -d '\r\n[:blank:]')

while [ "$state" != device ]; do

state=$($adb get-state | tr -d '\r\n[:blank:]')

read -n1 -s -p "Phone is not connected. Press any key to continue."

done

root=$($adb shell id | grep uid=0)

if [ -z "$root" ]; then

echo -e "Copy and run the exploit (may take up to two minutes)"

$adb push rageagainstthecage-arm5.bin /data/local/tmp/rageagainstthecage-arm5.bin

$adb push root.sh /data/local/tmp/root.sh

$adb shell chmod 755 /data/local/tmp/rageagainstthecage-arm5.bin

$adb shell chmod 755 /data/local/tmp/root.sh

$adb shell /data/local/tmp/root.sh

echo Wait for phone to reconnect...

sleep 20;

i=0;

state=$($adb get-state | tr -d '\r\n[:blank:]')

while [[ "$state" != device && $i -lt 30 ]]; do

state=$($adb get-state | tr -d '\r\n[:blank:]')

let i=i+1;

sleep 1;

done

if [ "$state" != "device" ]; then

echo "Phone did not reconnect after 30 seconds."

read -n1 -s -p "Pausing script. Unplug and replug USB cable and check the connection (verify with adb shell)."

fi

state=$($adb get-state | tr -d '\r\n[:blank:]')

if [ "$state" != "device" ]; then

echo "Aborting script. Phone is still not connected. Reboot the phone and try again.";

exit 1;

fi

root=$($adb shell id | grep uid=0)

if [ -z "$root" ]; then

echo "Root was not obtained. Please re-run the script."

exit 1;

fi

fi

echo "Mount system as r/w, cleanup old files, do some basic configuration"

$adb shell mount -t rfs -o remount,rw /dev/block/stl9 /system

oldroot=$($adb shell "if [ -f /system/bin/joeykrim-root.sh ]; then echo -n 'exists'; fi");

if [ -z "$oldroot" ]; then

$adb shell rm /system/bin/playlogo

$adb shell mv /system/bin/playlogo-orig /system/bin/playlogo

$adb shell chmod 755 /system/bin/playlogo

fi

$adb push rootsetup /data/local/tmp/rootsetup

$adb shell chmod 755 /data/local/tmp/rootsetup

$adb shell /data/local/tmp/rootsetup

$adb shell rm /data/local/tmp/rootsetup

$adb shell rm /system/app/Asphalt5_DEMO_ANMP_Samsung_D700_Sprint_ML.apk

$adb shell rm /system/app/FreeHDGameDemos.apk

echo "Copying files onto phone..."

$adb push su /system/xbin/su

$adb push Superuser.apk /system/app/Superuser.apk

$adb push busybox /system/xbin/busybox

$adb push remount /system/xbin/remount

echo "Setting permissions..."

$adb shell chmod 755 /system/xbin/busybox

$adb shell chmod 755 /system/xbin/remount

$adb shell chown root.shell /system/xbin/su

$adb shell chmod 4755 /system/xbin/su

$adb shell ln -s /system/xbin/su /system/bin/su

echo "Installing busybox..."

$adb shell /system/xbin/busybox --install -s /system/xbin

osversion=$(./adb shell getprop ro.build.id | tr -d '\r\n[:blank:]')

if [ "$osversion" == "FROYO" ]; then

echo Installing clockworkmod redirector

$adb push recovery /system/bin/recovery

$adb push recoveryfiles /system/bin/recoveryfiles/

$adb push recoveryres /system/bin/recoveryres/

$adb shell busybox chmod -R 0755 /system/bin/recoveryfiles/*

$adb shell busybox chmod -R 0755 /system/bin/recoveryres/*

$adb shell chmod 0755 /system/bin/recovery

$adb shell sync

fi

echo "Installing clockworkmod recovery..."

$adb push redbend_ua /data/local

$adb shell chmod 755 /data/local/redbend_ua

$adb push zImage /data/local/tmp/zImage

$adb shell /data/local/redbend_ua restore /data/local/tmp/zImage /dev/block/bml8

echo "Waiting for phone to reboot..."

sleep 5;

i=0;

state=$($adb get-state | tr -d '\r\n[:blank:]')

while [[ "$state" != device && $i -lt 45 ]]; do

state=$($adb get-state | tr -d '\r\n[:blank:]')

let i=i+1;

sleep 1;

done

echo "Cleaning up files..."

sleep 5;

$adb shell rm /data/local/redbend_ua

$adb shell rm /data/local/tmp/zImage

$adb shell rm /data/local/tmp/rageagainstthecage-arm5.bin

$adb shell rm /data/local/tmp/root.sh

if [ -z $(which sudo 2>/dev/null) ]; then

$adb kill-server

else

sudo $adb kill-server

fi

read -n1 -s -p "Press any key to exit the script."

anyone know the command in terminal to possibly run this. thanks!