aboutsummaryrefslogtreecommitdiff
path: root/post_update.sh
blob: 05c550cc6140d7c993951ae1874f6c95428bbe09 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/bash

# $1 Path to the new version.
# $2 Path to the old version.

cd $1

set -e

rm -rf .config generated/ android/

function generate() {
  which=$1
  echo -e "\n-------- $1\n"

  # These are the only generated files we actually need.
  files="config.h flags.h globals.h help.h newtoys.h tags.h"

  cp .config-$which .config
  NOBUILD=1 scripts/make.sh
  out=android/$which/generated/
  mkdir -p $out
  for f in $files; do cp generated/$f $out/$f ; done
  rm -rf .config generated/
}

generate "device"
generate "linux"
generate "mac"