diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2017-12-05 20:38:58 +0100 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2017-12-05 22:45:30 +0100 |
commit | 6687698375d7846a50ab00f1ad5a151618464e14 (patch) | |
tree | f694a87983d76b789affa02afd6373a6fe14c6c1 /standalone/bash | |
parent | wg-quick: accept ancient iproute2 (diff) | |
download | android_kernel_wireguard-6687698375d7846a50ab00f1ad5a151618464e14.tar.xz android_kernel_wireguard-6687698375d7846a50ab00f1ad5a151618464e14.zip |
Create flashable zip
Diffstat (limited to 'standalone/bash')
-rw-r--r-- | standalone/bash/.gitignore | 2 | ||||
-rw-r--r-- | standalone/bash/Android.mk | 23 | ||||
-rwxr-xr-x | standalone/bash/fetch.sh | 14 |
3 files changed, 39 insertions, 0 deletions
diff --git a/standalone/bash/.gitignore b/standalone/bash/.gitignore new file mode 100644 index 0000000..1993ef8 --- /dev/null +++ b/standalone/bash/.gitignore @@ -0,0 +1,2 @@ +android_external_bash-cm-14.1 +android_external_libncurses-cm-14.1 diff --git a/standalone/bash/Android.mk b/standalone/bash/Android.mk new file mode 100644 index 0000000..937e56c --- /dev/null +++ b/standalone/bash/Android.mk @@ -0,0 +1,23 @@ +ifeq ($(IN_THE_RIGHT_PLACE),yes-yes-i-am) +THIS_DIR := $(call my-dir) + +# AOSP build system things: +define all-c-files-under +$(call all-named-files-under,*.c,$(1)) +endef +define all-named-files-under +$(call find-files-in-subdirs,$(LOCAL_PATH),"$(1)",$(2)) +endef +define find-files-in-subdirs +$(sort $(patsubst ./%,%, \ + $(shell cd $(1) ; \ + find -L $(3) -name $(2) -and -not -name ".*") \ + )) +endef + +$(shell cd $(THIS_DIR) && ./fetch.sh ) +include $(THIS_DIR)/android_external_libncurses-cm-14.1/Android.mk +include $(THIS_DIR)/android_external_bash-cm-14.1/Android.mk +__ndk_modules.bash.CFLAGS += -D'getdtablesize()=sysconf(_SC_OPEN_MAX)' +__ndk_modules.builtins.CFLAGS += -D'getdtablesize()=sysconf(_SC_OPEN_MAX)' +endif diff --git a/standalone/bash/fetch.sh b/standalone/bash/fetch.sh new file mode 100755 index 0000000..b1b77e8 --- /dev/null +++ b/standalone/bash/fetch.sh @@ -0,0 +1,14 @@ +#!/bin/sh +set -e + +if [ ! -d android_external_bash-cm-14.1 ]; then + curl -L -o bash.zip https://github.com/LineageOS/android_external_bash/archive/cm-14.1.zip + unzip bash.zip + rm bash.zip +fi + +if [ ! -d android_external_libncurses-cm-14.1 ]; then + curl -L -o ncurses.zip https://github.com/LineageOS/android_external_libncurses/archive/cm-14.1.zip + unzip ncurses.zip + rm ncurses.zip +fi |