-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #222 from zksecurity/fix/test-cmd-stdlib
a couple fixes
- Loading branch information
Showing
10 changed files
with
85 additions
and
62 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,27 @@ | ||
use std::{env, path::PathBuf}; | ||
|
||
use fs_extra::dir::{self, CopyOptions}; | ||
|
||
fn main() { | ||
let home_dir: PathBuf = | ||
dirs::home_dir().expect("could not find home directory of current user"); | ||
|
||
let noname_dir = home_dir.join(".noname"); | ||
let release_dir = noname_dir.join("release"); | ||
|
||
// If it exists, then remove it | ||
if release_dir.exists() { | ||
fs_extra::remove_items(&[&release_dir]).expect("could not remove release directory"); | ||
} | ||
|
||
let current_dir = env::current_dir().expect("could not get current directory"); | ||
|
||
// Set up copy options | ||
let mut options = CopyOptions::new(); | ||
options.overwrite = true; // Overwrite existing files | ||
options.copy_inside = true; // Copy contents inside the source directory | ||
|
||
// Copy the current folder to the release directory | ||
dir::copy(current_dir, &release_dir, &options) | ||
.expect("could not copy current directory to release directory"); | ||
} |
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
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
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