~ chicken-core (master) /scripts/bootstrap.sh
Trap1#!/bin/sh
2
3set -e
4
5# build 6.0.0pre1 tarball
6
7getcmd="wget -c"
8mkcmd=make
9case "$(uname)" in
10 FreeBSD)
11 mkcmd=gmake
12 # FreeBSD's ftp doesn't support HTTPS (only HTTP)
13 getcmd=fetch;;
14 *BSD)
15 # Counter-intuitively, the ftp(1) program on many
16 # BSDs supports both HTTP(S) and FTP
17 getcmd=ftp
18 mkcmd=gmake;;
19esac
20
21mkdir -p boot/snapshot
22cd boot
23$getcmd https://code.call-cc.org/dev-snapshots/2024/12/09/chicken-6.0.0pre1.tar.gz
24tar -xzf chicken-6.0.0pre1.tar.gz
25cd chicken-6.0.0pre1
26./configure --prefix "$(pwd)"/../snapshot
27$mkcmd "$@"
28$mkcmd "$@" install
29cd ../..
30
31# build a boot-chicken from git head using the snapshot
32# chicken and then use that to build the real thing
33
34./configure --chicken "$(pwd)"/boot/snapshot/bin/chicken
35$mkcmd boot-chicken
36
37# remove snapshot installation and tarball
38rm -fr boot/snapshot
39rm -fr boot/chicken-6.0.0pre1
40rm -f boot/chicken-6.0.0pre1.tar.gz
41
42echo
43echo 'Now, build chicken by passing "--chicken ./chicken-boot" to "configure",'
44echo 'in addition to PREFIX, PLATFORM, and other parameters.'
45echo