[Droid RAZR M General] rockon999:
I did this a while back. This is a rough conversion of the script to linux:

echo "======================================================="
echo "= ="
echo "= Hydrogen PeroXide for MotoRAZR ="
echo "= based on GiefRooT V2 ="
echo "=	="
echo "= Special Thanks to: serg_gangubas ="
echo "= Many thanks to: ="
echo "= 4pda.ru ="
echo "= ITSTEP.ORG LUGANSK	="
echo "= ="
echo "= ="
echo "= - MohammadAG ="
echo "= - Keen Team	="
echo "= ="
echo "= Please donate with paypal: hydrogenxs@gmail.com ="
echo "= giefroot created by by zxz0O0 ="
echo "= Hydrogen PeroXide created by HydrogenXS ="
echo "======================================================="

cd files

adb kill-server
adb start-server

echo "============================================="
echo "Waiting for Device, connect USB cable now..."
echo "Make sure that you authorize the connection"
echo "if you get any message on the phone"
echo "============================================="
adb wait-for-device
echo "Device found!"

echo "============================================="
echo "Sending files"
echo "============================================="

adb push a /data/local/tmp
adb push getroot /data/local/tmp
adb push giefroot /data/local/tmp
adb push modulecrcpatch /data/local/tmp
adb push systemrw.sh /data/local/tmp
adb push wp_mod.ko /data/local/tmp
adb push UPDATE-SuperSU-v2.45.zip /data/local/tmp/SuperSU.zip
adb push busybox /data/local/tmp
adb push installsupersu.sh /data/local/tmp
adb push fips_enabled /data/local/tmp

adb shell "chmod 777 /data/local/tmp/a"
adb shell "chmod 777 /data/local/tmp/modulecrcpatch"
adb shell "chmod 777 /data/local/tmp/giefroot"
adb shell "chmod 777 /data/local/tmp/getroot"
adb shell "chmod 777 /data/local/tmp/systemrw.sh"
adb shell "chmod 777 /data/local/tmp/wp_mod.ko"
adb shell "chmod 777 /data/local/tmp/busybox"
adb shell "chmod 777 /data/local/tmp/installsupersu.sh"
adb shell "chmod 777 /data/local/tmp/"
adb shell "touch /data/local/tmp/giefrootlog"
adb shell "chmod 777 /data/local/tmp/giefrootlog"
adb shell "chmod 777 /data/local/tmp/fips_enabled"

adb uninstall org.keenteam
adb install exploitServiceApp.apk
adb install tr.apk
adb install supersu.apk

echo "============================================="
echo "Running exploit"
echo "Make sure you have enabled ^Allow mock locations^"
echo "in Developer Settings!"
echo "============================================="
adb shell "/data/local/tmp/giefroot"

echo "============================================="
echo "Please wait for the device to reboot"
adb kill-server
adb start-server
adb wait-for-device
echo "============================================="
echo "Device found!"
echo "Reboot to fastboot!"
adb reboot bootloader

echo "============================================="
echo "Device found!"
./moto-fastboot flash recovery root.img
./moto-fastboot reboot

echo "============================================="
echo "Please wait for the device to reboot"

adb kill-server
adb start-server
adb wait-for-device
echo "============================================="
echo "Device found!"
adb reboot recovery

echo "============================================="
echo "Please wait for the device to reboot"

adb kill-server
adb start-server
adb wait-for-device

echo "============================================="
echo "Device found!"
echo "Please open towelroot on your device, get root and press any key when you be ready..."
read -rsp $'Press enter to continue...
'

echo "============================================="
echo "Reboot to fastboot!"
adb kill-server
adb start-server
adb wait-for-device
echo "============================================="
echo "Device found!"
adb reboot bootloader

echo "============================================="
echo "Device found!"
./moto-fastboot flash recovery recovery.img
./moto-fastboot reboot

echo "============================================="
echo "Please wait for the device to reboot"

adb kill-server
adb start-server
adb wait-for-device

echo "============================================="
echo "Device found!"
adb uninstall com.geohot.towelroot
adb uninstall org.keenteam
adb install supersu.apk
adb shell "rm /data/local/tmp/a"
adb shell "rm /data/local/tmp/systemrw.sh"
adb shell "rm /data/local/tmp/getroot"
adb shell "rm /data/local/tmp/giefroot"
adb shell "rm /data/local/tmp/wp_mod.ko"
adb shell "rm /data/local/tmp/modulecrcpatch"
adb shell "rm /data/local/tmp/installsupersu.sh"
adb shell "rm /data/local/tmp/SuperSU.zip"
adb shell "rm /data/local/tmp/memfile"

echo "Done. You can now unplug your device."
echo "Enjoy root!"
read -rsp $'Press enter to continue...
'

It requires Motorola's fastboot which you can download here: http://xdaforums.com/showthread.php?t=1138092

In the 'files' folder replace fastboot.exe with moto-fastboot, delete adb.exe, and remove any files ending in .dll

Make sure you have adb installed on your system :)

(You must also rename install_root.batch to install_root.sh and give it executable permissions)

EDIT: NEVER USE WINE FOR ROOTING PHONES UNLESS IT SPECIFICALLY SAYS TO. If wine decides to not work, your phone might too. :)