functional service

This commit is contained in:
Zynh Ludwig 2024-08-01 03:50:08 -07:00
parent 65d3dee18b
commit da7d41cfa6

View file

@ -15,7 +15,9 @@ in
let let
execName = service; execName = service;
script = writeShellScriptBin execName '' script = writeShellScriptBin execName ''
set -xv clone_repo() {
git clone "$1" "$2"
}
while IFS="" read -r p || [ -n "$p" ] while IFS="" read -r p || [ -n "$p" ]
do do
@ -25,10 +27,12 @@ in
if [ -d "$target" ]; then if [ -d "$target" ]; then
if ${pkgs.findutils}/bin/find "$target" -maxdepth 0 -empty | read v; then if ${pkgs.findutils}/bin/find "$target" -maxdepth 0 -empty | read v; then
echo "~ No Files in $target ~" clone_repo "$repo" "$target"
else else
echo "~ Found Files at $target ~" echo "Files already found: $target"
fi fi
else
clone_repo "$repo" "$target"
fi fi
done < "${config.repo-clone.pkg}" done < "${config.repo-clone.pkg}"
''; '';