1 #!/bin/bash 2 # 3 # Copy Quake's data files from perforce to the Android device's sd card. 4 # Based on emulator.sh 5 # 6 7 # We need some internal functions defined in envsetup.sh, so start 8 # by finding this file and sourcing it before anything else 9 # 10 function gettop 11 { 12 echo $TOP 13 } 14 15 T=$(gettop) 16 if [ -z "$T" ] ; then 17 echo "please run your envsetup.sh script" 18 exit 1 19 fi 20 21 echo "top found at $T" 22 23 echo "Creating Quake directories on the device's sdcard" 24 25 adb shell mkdir /sdcard 26 adb shell mkdir /sdcard/data 27 adb shell mkdir /sdcard/data/quake 28 adb shell mkdir /sdcard/data/quake/id1 29 30 echo "Copying Quake data files to the device. (This could take several minutes)" 31 adb push $T/external/quake/quake/app/id1 /sdcard/data/quake/id1 32 echo "Done." 33