1#!/bin/bash
2#
3# Copy Quake's data files from perforce to the Android device's data directory.
4# Based on emulator.sh
5#
6
7# This funcion is copied from envsetup.sh
8
9function gettop
10{
11    echo $TOP
12}
13
14T=$(gettop)
15if [ -z "$T" ] ; then
16    echo "please run your envsetup.sh script"
17    exit 1
18fi
19
20echo "top found at $T"
21
22
23echo "Creating Quake directories on the device"
24
25adb shell mkdir /data
26adb shell mkdir /data/quake
27adb shell mkdir /data/quake/id1
28
29echo "Copying Quake data files to the device. (This could take several minutes)"
30adb push $T/external/quake/quake/app/id1 /data/quake/id1
31echo "Done."
32