aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorbrettchabot <brettchabot@google.com>2018-09-06 09:54:20 -0700
committerBrett Chabot <brettchabot@google.com>2018-09-27 11:16:00 -0700
commite71bae4b8e9f6f3d84528d0adab7642b20e88bed (patch)
tree40bafb44667c57d869fd87b7b9900d99811fa31c /scripts
parenta2fed5d05586e1ebdc87059689ab3fd280cd6f35 (diff)
downloadrobolectric-e71bae4b8e9f6f3d84528d0adab7642b20e88bed.tar.gz
Internal change
PiperOrigin-RevId: 211823400
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/install-android-prebuilt.sh10
-rwxr-xr-xscripts/update-cpp.sh63
2 files changed, 2 insertions, 71 deletions
diff --git a/scripts/install-android-prebuilt.sh b/scripts/install-android-prebuilt.sh
index 4fb3fab83..08fda6d3a 100755
--- a/scripts/install-android-prebuilt.sh
+++ b/scripts/install-android-prebuilt.sh
@@ -43,14 +43,8 @@ ANDROID_BUNDLE=android-all-${ROBOLECTRIC_VERSION}-bundle.jar
generate_empty_src_javadoc() {
TMP=`mktemp --directory`
cd ${TMP}
- if [ ! -f ${JAR_DIR}/${ANDROID_ALL_DOC} ]; then
- echo "Generating empty jar for javadoc"
- jar cf ${JAR_DIR}/${ANDROID_ALL_DOC} .
- fi
- if [ ! -f ${JAR_DIR}/${ANDROID_ALL_SRC} ]; then
- echo "Generating empty jar for sources"
- jar cf ${JAR_DIR}/${ANDROID_ALL_SRC} .
- fi
+ jar cf ${JAR_DIR}/${ANDROID_ALL_DOC} .
+ jar cf ${JAR_DIR}/${ANDROID_ALL_SRC} .
cd ${JAR_DIR}; rm -rf ${TMP}
}
diff --git a/scripts/update-cpp.sh b/scripts/update-cpp.sh
deleted file mode 100755
index 122c56058..000000000
--- a/scripts/update-cpp.sh
+++ /dev/null
@@ -1,63 +0,0 @@
-#!/bin/bash
-
-set -e
-
-#currentVersion=android-8.0.0_r36
-#currentVersion=android-8.1.0_r22
-currentVersion=android-9.0.0_r3
-
-baseDir=`dirname $0`/..
-frameworksBaseRepoDir="$HOME/Dev/AOSP/frameworks/base"
-
-function showDiffs2() {
- file="$1"
- line="$2"
-
- x=$(echo "$line" | sed -e 's/.*https:\/\/android.googlesource.com\/\([^ ]*\)\/[+]\/\([^/]*\)\/\([^ ]*\).*/\1 \2 \3/')
- IFS=" " read -a parts <<< "$x"
- repo="${parts[0]}"
- version="${parts[1]}"
- repoFile="${parts[2]}"
-
- curSha=$(cd "$frameworksBaseRepoDir" && git rev-parse --verify "$currentVersion") || true
- if [[ -z "$curSha" ]]; then
- echo "Unknown $currentVersion!"
- exit 1
- fi
-
- thisSha=$(cd "$frameworksBaseRepoDir" && git rev-parse --verify "$version") || true
- if [[ -z "$thisSha" ]]; then
- echo "Unknown $version!"
- return
- fi
-
- if [ "x$curSha" != "x$thisSha" ]; then
- tmpFile="/tmp/diff.tmp"
- rm -f "$tmpFile"
- echo "Apply changes to: $file" > "$tmpFile"
- echo " From $repoFile $version -> $currentVersion" >> "$tmpFile"
- (cd "$frameworksBaseRepoDir" && git diff --color=always "${version}..${currentVersion}" "--" "$repoFile" >> "$tmpFile")
- less -r "$tmpFile"
- fi
-}
-
-function showDiffs() {
- file="$1"
-
- grep -E 'https?:\/\/(android\.googlesource\.com|.*\.git\.corp\.google\.com)\/' "$file" | \
- while read -r line ; do
- showDiffs2 "$file" "$line"
- done
-}
-
-files=$*
-
-if [ -z "$files" ]; then
- find . -name "*.java" -print0 | while read -d $'\0' file; do
- showDiffs "$file"
- done
-else
- for file in "$files"; do
- showDiffs "$file"
- done
-fi \ No newline at end of file