mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-19 04:53:36 +00:00
Add command line option to skip map download; switch to wget
Signed-off-by: David Gekeler <git@davidgekeler.eu>
This commit is contained in:
34
configure.sh
34
configure.sh
@@ -3,8 +3,31 @@
|
|||||||
# Please run this script to configure the repository after cloning it.
|
# Please run this script to configure the repository after cloning it.
|
||||||
#
|
#
|
||||||
|
|
||||||
|
SKIP_MAP_DOWNLOAD=false
|
||||||
|
|
||||||
|
############################# PROCESS OPTIONS ################################
|
||||||
|
|
||||||
|
TEMP=$(getopt -o s --long skip-map-download \
|
||||||
|
-n 'configure' -- "$@")
|
||||||
|
|
||||||
|
if [ $? != 0 ] ; then echo "Terminating..." >&2 ; exit 1 ; fi
|
||||||
|
|
||||||
|
eval set -- "$TEMP"
|
||||||
|
|
||||||
|
while true; do
|
||||||
|
case "$1" in
|
||||||
|
-s | --skip-map-download ) SKIP_MAP_DOWNLOAD=true; shift ;;
|
||||||
|
* ) break ;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
# Shift the processed options away
|
||||||
|
shift $((OPTIND-1))
|
||||||
|
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
echo "Configuring the repository for development."
|
echo "Configuring the repository for development."
|
||||||
|
|
||||||
if [ ! -d 3party/boost/tools ]; then
|
if [ ! -d 3party/boost/tools ]; then
|
||||||
@@ -14,6 +37,15 @@ pushd 3party/boost/
|
|||||||
./bootstrap.sh
|
./bootstrap.sh
|
||||||
./b2 headers
|
./b2 headers
|
||||||
popd
|
popd
|
||||||
curl -C - -L --parallel --parallel-immediate --parallel-max 2 https://cdn.comaps.app/maps/latest/World.mwm -o data/World.mwm https://cdn.comaps.app/maps/latest/WorldCoasts.mwm -o data/WorldCoasts.mwm
|
|
||||||
|
if [ "$SKIP_MAP_DOWNLOAD" = false ]; then
|
||||||
|
echo "Downloading world map..."
|
||||||
|
wget -N https://cdn.comaps.app/maps/latest/World.mwm -P ./data/
|
||||||
|
wget -N https://cdn.comaps.app/maps/latest/WorldCoasts.mwm -P ./data/
|
||||||
|
else
|
||||||
|
echo "Skipping world map download..."
|
||||||
|
fi
|
||||||
|
|
||||||
bash ./tools/unix/generate_symbols.sh
|
bash ./tools/unix/generate_symbols.sh
|
||||||
|
|
||||||
echo "The repository is configured for development."
|
echo "The repository is configured for development."
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ cd comaps
|
|||||||
|
|
||||||
Install required packages (Ubuntu/Debian):
|
Install required packages (Ubuntu/Debian):
|
||||||
```bash
|
```bash
|
||||||
sudo apt install qt6-base-dev qt6-declarative-dev libqt6svg6-dev optipng curl
|
sudo apt install qt6-base-dev qt6-declarative-dev libqt6svg6-dev optipng
|
||||||
```
|
```
|
||||||
|
|
||||||
Configure the repository (make sure you have a working C++ build environment):
|
Configure the repository (make sure you have a working C++ build environment):
|
||||||
|
|||||||
Reference in New Issue
Block a user