-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
25 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
use anyhow::{Context, Result}; | ||
use xshell::{cmd, Shell}; | ||
|
||
pub fn main() -> Result<()> { | ||
let sh = &Shell::new()?; | ||
let tmp = sh.create_temp_dir()?; | ||
sh.change_dir(tmp.path()); | ||
cmd!(sh, "git clone https://github.com/osmcode/libosmium").run()?; | ||
cmd!( | ||
sh, | ||
"apt install cmake cmake-curses-gui make libexpat1-dev zlib1g-dev libbz2-dev libboost-dev libprotobuf-dev protobuf-compiler libosmpbf-dev libprotozero-dev libutfcpp-dev" | ||
).run()?; | ||
sh.change_dir("libosmium"); | ||
cmd!(sh, "mkdir build").run()?; | ||
sh.change_dir("build"); | ||
cmd!(sh, "cmake ..").run()?; | ||
cmd!(sh, "make -j").run()?; | ||
cmd!(sh, "make install").run()?; | ||
Ok(()) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,18 @@ | ||
use clap::Parser; | ||
|
||
mod ci; | ||
mod install_osmium; | ||
|
||
#[derive(Parser)] | ||
enum Command { | ||
CI, | ||
InstallOsmium, | ||
} | ||
|
||
fn main() -> anyhow::Result<()> { | ||
let cmd = Command::parse(); | ||
match cmd { | ||
Command::CI => ci::main(), | ||
Command::InstallOsmium => install_osmium::main(), | ||
} | ||
} |