The Android Open Source Project | f6c3871 | 2009-03-03 19:28:47 -0800 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | # |
| 3 | # Copyright (C) 2007 The Android Open Source Project |
| 4 | # |
| 5 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 | # you may not use this file except in compliance with the License. |
| 7 | # You may obtain a copy of the License at |
| 8 | # |
| 9 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | # |
| 11 | # Unless required by applicable law or agreed to in writing, software |
| 12 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | # See the License for the specific language governing permissions and |
| 15 | # limitations under the License. |
| 16 | |
Dan Bornstein | ec85aa9 | 2010-11-04 11:22:35 -0700 | [diff] [blame] | 17 | # Set up prog to be the path of this script, including following symlinks, |
| 18 | # and set up progdir to be the fully-qualified pathname of its directory. |
| 19 | prog="$0" |
| 20 | while [ -h "${prog}" ]; do |
| 21 | newProg=`/bin/ls -ld "${prog}"` |
| 22 | newProg=`expr "${newProg}" : ".* -> \(.*\)$"` |
| 23 | if expr "x${newProg}" : 'x/' >/dev/null; then |
| 24 | prog="${newProg}" |
| 25 | else |
| 26 | progdir=`dirname "${prog}"` |
| 27 | prog="${progdir}/${newProg}" |
| 28 | fi |
| 29 | done |
Dan Bornstein | ec85aa9 | 2010-11-04 11:22:35 -0700 | [diff] [blame] | 30 | progdir=`dirname "${prog}"` |
Dan Bornstein | d8bb0d7 | 2010-11-12 12:15:46 -0800 | [diff] [blame] | 31 | cd "${progdir}" |
| 32 | progdir=`pwd` |
The Android Open Source Project | f6c3871 | 2009-03-03 19:28:47 -0800 | [diff] [blame] | 33 | |
Dan Bornstein | ec85aa9 | 2010-11-04 11:22:35 -0700 | [diff] [blame] | 34 | # Be in the parent of the progdir when running the rest of the script. |
Dan Bornstein | d8bb0d7 | 2010-11-12 12:15:46 -0800 | [diff] [blame] | 35 | cd ".." |
Dan Bornstein | ec85aa9 | 2010-11-04 11:22:35 -0700 | [diff] [blame] | 36 | |
Dan Bornstein | 82dbe1c | 2010-11-16 12:21:50 -0800 | [diff] [blame] | 37 | ${progdir}/opcode-gen dx/src/com/android/dx/dex/code/Dops.java |
| 38 | ${progdir}/opcode-gen dx/src/com/android/dx/dex/code/RopToDop.java |
Dan Bornstein | 3c5df37 | 2011-01-25 16:39:12 -0800 | [diff] [blame] | 39 | ${progdir}/opcode-gen dx/src/com/android/dx/io/OpcodeInfo.java |
Dan Bornstein | 7ba9129 | 2011-01-30 14:05:39 -0800 | [diff] [blame] | 40 | ${progdir}/opcode-gen dx/src/com/android/dx/io/Opcodes.java |
Dan Bornstein | 26a6b7f | 2011-04-19 10:32:23 -0700 | [diff] [blame] | 41 | ${progdir}/opcode-gen libdex/DexOpcodes.cpp |
Dan Bornstein | df4daaf | 2010-12-01 14:23:44 -0800 | [diff] [blame] | 42 | ${progdir}/opcode-gen libdex/DexOpcodes.h |
Dan Bornstein | 26a6b7f | 2011-04-19 10:32:23 -0700 | [diff] [blame] | 43 | ${progdir}/opcode-gen libdex/InstrUtils.cpp |
Dan Bornstein | caf4e5a | 2010-11-29 16:47:09 -0800 | [diff] [blame] | 44 | |
| 45 | # It's a minor shame that these files live in a different top-level project. |
| 46 | # So it goes. |
| 47 | ${progdir}/opcode-gen \ |
| 48 | ../libcore/dalvik/src/main/java/dalvik/bytecode/OpcodeInfo.java |
| 49 | ${progdir}/opcode-gen \ |
| 50 | ../libcore/dalvik/src/main/java/dalvik/bytecode/Opcodes.java |