5 ###^^^^^^^^^^^^^^^^^^###
6 ### Global variables ###
7 ###__________________###
9 _exec
="make-bootstrap.sh"
10 _this
="$(dirname "$
(readlink
-f "$0")")"
19 echo "Usage: make-bootstrap.sh [options]"
21 echo " -v version Set build version"
30 "$_this/make.sh" -x -o "$_this/bootstrap/$_cpu-$_target-$_system" \
31 "$_cpu" "$_target" "$_system"
32 find "$_this/bootstrap/$_cpu-$_target-$_system" -mindepth 1 -maxdepth 1 \
33 -type d
-name 'CodeC' -prune -o -exec rm -rf {} +
45 while getopts v
:Sh _name
48 v
) _version
="$OPTARG" ;;
54 if [ -z "$_version" ] ||
echo "$_version" |
grep " " > /dev
/null
; then
55 error
"version not specified or contain spaces"
58 ###^^^^^^^^^^^^^^^^^^^^###
59 ### Prebuild C sources ###
60 ###____________________###
62 rm -rf "$_this/bootstrap"
63 mkdir
-p "$_this/bootstrap"
64 make_bootstrap
486 cpfront linux
65 make_bootstrap
486 cpfront cygwin
66 make_bootstrap arm cpfront linux
68 ###^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^###
69 ### Hack: remove temp files from v0.1 ###
70 ###___________________________________###
72 find "$_this/bootstrap" -type f
-name '.new*' -delete
74 ###^^^^^^^^^^^^^^^^^^^^^^###
75 ### Package dist sources ###
76 ###______________________###
78 rm -rf "$_this/cpc-$_version"
79 mkdir
-p "$_this/cpc-$_version"
80 cp -rt "$_this/cpc-$_version" -- \
87 "$_this/make-all.sh" \
88 "$_this/make-bootstrap.sh" \
92 tar czf
"cpc-$_version.src.tar.gz" "cpc-$_version"
94 ###^^^^^^^^^^^^^^^^###
95 ### Make signature ###
96 ###________________###
99 gpg
--yes --armor --detach-sig "cpc-$_version.src.tar.gz"