Misc #35

Merged
oysteikt merged 13 commits from misc into main 2024-08-07 17:29:15 +02:00
1 changed files with 7 additions and 3 deletions
Showing only changes of commit 404e5371e3 - Show all commits

View File

@ -17,20 +17,24 @@ fn main() -> anyhow::Result<()> {
.ok_or(anyhow!("Could not resolve target profile directory"))? .ok_or(anyhow!("Could not resolve target profile directory"))?
.to_path_buf(); .to_path_buf();
dbg!(&target_profile_dir); if !target_profile_dir.exists() {
std::fs::create_dir_all(&target_profile_dir)?;
}
if !target_profile_dir.join("mysql-useradm").exists() { if !target_profile_dir.join("mysql-useradm").exists() {
symlink( symlink(
target_profile_dir.join("mysqladm"), target_profile_dir.join("mysqladm"),
target_profile_dir.join("mysql-useradm"), target_profile_dir.join("mysql-useradm"),
)?; )
.ok();
} }
if !target_profile_dir.join("mysql-dbadm").exists() { if !target_profile_dir.join("mysql-dbadm").exists() {
symlink( symlink(
target_profile_dir.join("mysqladm"), target_profile_dir.join("mysqladm"),
target_profile_dir.join("mysql-dbadm"), target_profile_dir.join("mysql-dbadm"),
)?; )
.ok();
} }
} }