mirror of
https://github.com/a-b-street/abstreet.git
synced 2024-12-25 15:33:44 +03:00
refactoring the common parts of the release scripts
This commit is contained in:
parent
c82413fca5
commit
9b96ef69da
20
release/common.sh
Executable file
20
release/common.sh
Executable file
@ -0,0 +1,20 @@
|
||||
function common_release {
|
||||
OUT=$1;
|
||||
|
||||
rm -rfv $OUT
|
||||
mkdir $OUT
|
||||
|
||||
cp docs/INSTRUCTIONS.md $OUT
|
||||
mkdir $OUT/data
|
||||
cp data/color_scheme.json $OUT/data
|
||||
|
||||
mkdir $OUT/data/maps
|
||||
for map in 23rd ballard caphill downtown montlake; do
|
||||
cp -v data/maps/$map.bin $OUT/data/maps/
|
||||
mkdir -p $OUT/data/scenarios/$map
|
||||
cp -v data/scenarios/$map/psrc* $OUT/data/scenarios/$map/
|
||||
done
|
||||
|
||||
mkdir $OUT/data/shapes
|
||||
cp -v data/shapes/popdat.bin $OUT/data/shapes
|
||||
}
|
@ -8,22 +8,10 @@ if [[ "$OSTYPE" == "darwin"* ]]; then
|
||||
OUT=abstreet_mac
|
||||
fi
|
||||
|
||||
rm -rfv $OUT
|
||||
mkdir $OUT
|
||||
source release/common.sh
|
||||
common_release $OUT
|
||||
|
||||
cp docs/INSTRUCTIONS.md release/play_abstreet.sh $OUT
|
||||
mkdir $OUT/data
|
||||
cp data/color_scheme.json $OUT/data
|
||||
|
||||
mkdir $OUT/data/maps
|
||||
for map in 23rd ballard caphill downtown montlake; do
|
||||
cp -v data/maps/$map.bin $OUT/data/maps/
|
||||
mkdir -p $OUT/data/scenarios/$map
|
||||
cp -v data/scenarios/$map/psrc* $OUT/data/scenarios/$map/
|
||||
done
|
||||
|
||||
mkdir $OUT/data/shapes
|
||||
cp -v data/shapes/popdat.bin $OUT/data/shapes
|
||||
cp release/play_abstreet.sh $OUT
|
||||
|
||||
mkdir $OUT/editor
|
||||
cargo build --release --bin editor
|
||||
|
@ -4,22 +4,11 @@
|
||||
set -e
|
||||
|
||||
OUT=abstreet_windows
|
||||
rm -rfv $OUT
|
||||
mkdir $OUT
|
||||
|
||||
cp docs/INSTRUCTIONS.md release/play_abstreet.bat $OUT
|
||||
mkdir $OUT/data
|
||||
cp data/color_scheme.json $OUT/data
|
||||
source release/common.sh
|
||||
common_release $OUT
|
||||
|
||||
mkdir $OUT/data/maps
|
||||
for map in 23rd ballard caphill downtown montlake; do
|
||||
cp -v data/maps/$map.bin $OUT/data/maps/
|
||||
mkdir -p $OUT/data/scenarios/$map
|
||||
cp -v data/scenarios/$map/psrc* $OUT/data/scenarios/$map/
|
||||
done
|
||||
|
||||
mkdir $OUT/data/shapes
|
||||
cp -v data/shapes/popdat.bin $OUT/data/shapes
|
||||
cp release/play_abstreet.bat $OUT
|
||||
|
||||
mkdir $OUT/editor
|
||||
cross build --release --target x86_64-pc-windows-gnu --bin editor
|
||||
|
Loading…
Reference in New Issue
Block a user