Skip to content

Commit f0d4ab5

Browse files
committed
Add redox installation script
1 parent 86a6b2a commit f0d4ab5

File tree

2 files changed

+41
-0
lines changed

2 files changed

+41
-0
lines changed

redox_recipe.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
GIT=https://github.com/RustPython/RustPython
2+
BRANCH=redox
3+
CARGOFLAGS=--no-default-features
4+
5+
function recipe_stage() {
6+
dest="$(realpath "$1")"
7+
mkdir -pv "$dest/lib/"
8+
cp -r Lib "$dest/lib/rustpython"
9+
}

redux-install.sh

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
DIR=$(dirname "$0")
6+
7+
case $# in
8+
0) ;;
9+
1)
10+
cd "$1"
11+
;;
12+
*)
13+
echo "Too many arguments" >&2
14+
exit 1
15+
;;
16+
esac
17+
18+
if [[ ! -d cookbook ]]; then
19+
echo "You do not appear to be in a redox checkout (no 'cookbook' directory). " \
20+
"Please run this script from or specify as an argument the root of your redox checkout." >&2
21+
exit 1
22+
fi
23+
24+
mkdir -p cookbook/recipes/rustpython
25+
26+
cp "$DIR"/redox_recipe.sh cookbook/recipes/rustpython/recipe.sh
27+
28+
if ! grep -q -w rustpython filesystem.toml; then
29+
sed -i 's/\[packages\]/[packages]\nrustpython = {}/' filesystem.toml
30+
fi
31+
32+
echo "All done! Run 'make qemu' to rebuild and run with rustpython installed."

0 commit comments

Comments
 (0)