Skip to content

Commit 94d36a6

Browse files
committed
Added release.sh script to generate archives, edited README.md
1 parent 51fe7f7 commit 94d36a6

File tree

2 files changed

+44
-5
lines changed

2 files changed

+44
-5
lines changed

README.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
This repository is intended as a tutorial for building the **GNU toolchain on
66
Android**, with support for **Fortran**. Prebuilt versions can be found
7-
in the [Downloads](##Downloads) section.
7+
in the [Releases](/releases) section.
88

99
It is based on my experience building
1010
[OpenBLAS](https://github.com/xianyi/OpenBLAS) with LAPACK for Android
@@ -136,7 +136,3 @@ the toolchain that was already packaged with the NDK.
136136

137137
For instance, on Linux 64-bit for the AArch64 toolchain, unpack the archive as
138138
`ndk/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64`.
139-
140-
## Downloads
141-
142-
TODO: To be added.

release.sh

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
#!/bin/bash
2+
3+
# This script creates alternative archives without sysroot/ from standalone toolchains.
4+
5+
# Reads from out/dist/, outputs to out/releases/
6+
if [ ! -d out/releases ]
7+
then
8+
mkdir out/releases
9+
fi
10+
11+
cd out/dist
12+
13+
# Clean potential tmp/ folder
14+
if [ -d tmp ]
15+
then
16+
rm -fr tmp;
17+
fi
18+
19+
for x in `ls`;
20+
do
21+
if [ -d tmp ]
22+
then
23+
rm -fr tmp
24+
fi
25+
26+
# Extract the toolchain
27+
mkdir tmp
28+
cd tmp
29+
tar xvf ../$x;
30+
31+
# Find the toolchain name
32+
TOOLCHAIN=`ls`
33+
34+
# Standalone toolchain
35+
tar cvf ../../releases/$TOOLCHAIN-standalone.tar.bz2 $TOOLCHAIN
36+
37+
# Toolchain without sysroot/
38+
rm -fr $TOOLCHAIN/sysroot
39+
tar cvf ../../releases/$TOOLCHAIN.tar.bz2 $TOOLCHAIN
40+
41+
cd ..
42+
rm -fr tmp
43+
done

0 commit comments

Comments
 (0)