Skip to content

Commit 8d18dfd

Browse files
committed
[update] add build.rs and install.sh
1 parent d75634e commit 8d18dfd

File tree

3 files changed

+16
-1
lines changed

3 files changed

+16
-1
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
use std::env;
2+
use std::path::Path;
3+
use std::process::Command;
4+
5+
fn main() {
6+
println!("cargo:rerun-if-changed=build.rs");
7+
let src_dir = env::var_os("CARGO_MANIFEST_DIR").unwrap();
8+
let src_dir = Path::new(&src_dir);
9+
Command::new("sh").arg("-c").arg("./install.sh").current_dir(src_dir).spawn().unwrap();
10+
}

install.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/sh
2+
rustup install stable
3+
rustup default stable
4+
rustup target add x86_64-unknown-linux-musl
5+
pkexec cp ./swhkd.rules /etc/polkit-1/rules.d/swhkd.rules

0 commit comments

Comments
 (0)