Skip to content

Commit

Permalink
[update] add build.rs and install.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
Shinyzenith committed Mar 6, 2022
1 parent d75634e commit 8d18dfd
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions build.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
use std::env;
use std::path::Path;
use std::process::Command;

fn main() {
println!("cargo:rerun-if-changed=build.rs");
let src_dir = env::var_os("CARGO_MANIFEST_DIR").unwrap();
let src_dir = Path::new(&src_dir);
Command::new("sh").arg("-c").arg("./install.sh").current_dir(src_dir).spawn().unwrap();
}
5 changes: 5 additions & 0 deletions install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh
rustup install stable
rustup default stable
rustup target add x86_64-unknown-linux-musl
pkexec cp ./swhkd.rules /etc/polkit-1/rules.d/swhkd.rules

0 comments on commit 8d18dfd

Please sign in to comment.