From 42f866c0f7f91eecc8f64c7bc9290de4bc8712ad Mon Sep 17 00:00:00 2001 From: Pierre Neidhardt Date: Mon, 26 Feb 2018 23:12:02 +0100 Subject: [PATCH] bin/demlo-sync: Wrapper to sync music to external device --- .config/demlo/scripts/59-path-sync.lua | 2 ++ .local/bin/demlo-sync | 7 +++++++ 2 files changed, 9 insertions(+) create mode 100644 .config/demlo/scripts/59-path-sync.lua create mode 100755 .local/bin/demlo-sync diff --git a/.config/demlo/scripts/59-path-sync.lua b/.config/demlo/scripts/59-path-sync.lua new file mode 100644 index 00000000..0f7941d6 --- /dev/null +++ b/.config/demlo/scripts/59-path-sync.lua @@ -0,0 +1,2 @@ +help("Set 'pathsub' to be VFAT friendly. See path.lua.") +pathsub = {{'["*?:/\|<>]', ""}} diff --git a/.local/bin/demlo-sync b/.local/bin/demlo-sync new file mode 100755 index 00000000..5c0ab1d0 --- /dev/null +++ b/.local/bin/demlo-sync @@ -0,0 +1,7 @@ +#!/bin/sh + +path='lib="/media/COWON S9/Music"' +if [ ! -d "/media/COWON S9/Music" ]; then + path='lib="/run/media/'$(id -nu)'/COWON S9/Music"' +fi +demlo -p -exist skip -r '' -pre "$path" -s 59-path-sync -s 60-path "$@"