From 6276e0b53dfb4ccc1c5f1c3b6096e339c594b74b Mon Sep 17 00:00:00 2001 From: Crony Akatsuki <crony@cronyakatsuki.xyz> Date: Thu, 20 Mar 2025 11:38:17 +0100 Subject: [PATCH] feat: add script for converting iso to chd. --- modules/home-manager/scripts/bin/iso2chd | 7 +++++++ modules/home-manager/scripts/default.nix | 4 ++++ 2 files changed, 11 insertions(+) create mode 100755 modules/home-manager/scripts/bin/iso2chd diff --git a/modules/home-manager/scripts/bin/iso2chd b/modules/home-manager/scripts/bin/iso2chd new file mode 100755 index 0000000..41c8e81 --- /dev/null +++ b/modules/home-manager/scripts/bin/iso2chd @@ -0,0 +1,7 @@ +#!/usr/bin/env sh + +for File in *.iso; do + [ -f "$File" ] || continue + chdman createdvd -i "$File" -o "${File%.iso}.chd" + rm -v "$File" +done diff --git a/modules/home-manager/scripts/default.nix b/modules/home-manager/scripts/default.nix index 1ef856d..20ab53c 100644 --- a/modules/home-manager/scripts/default.nix +++ b/modules/home-manager/scripts/default.nix @@ -19,5 +19,9 @@ with pkgs; # Add dependencies to the runtime for my cue2chd script wrapProgram $out/bin/cue2chd \ --prefix PATH : ${lib.makeBinPath [mame-tools]} + + # Add dependencies to the runtime for my iso2chd script + wrapProgram $out/bin/cue2chd \ + --prefix PATH : ${lib.makeBinPath [mame-tools]} ''; }