diff --git a/migrations/1.9.0.0.sh b/migrations/1.9.0.0.sh index be30535..4800dae 100644 --- a/migrations/1.9.0.0.sh +++ b/migrations/1.9.0.0.sh @@ -13,7 +13,7 @@ mkdir -p "$XDG_CONFIG_HOME/sxmo/hooks/$SXMO_DEVICE_NAME" [ -e off ] && mv off "$SXMO_DEVICE_NAME/sxmo_hook_screenoff.sh" [ -e unlock ] && mv unlock "$SXMO_DEVICE_NAME/sxmo_hook_unlock.sh" -find . -type f -maxdepth 1 -exec basename {} \; \ +find . -maxdepth 1 -type f -exec basename {} \; \ | grep -v 'needs-migration$' \ | grep -v '^sxmo_hook_.*\.sh$' \ | xargs -I{} mv {} sxmo_hook_{}.sh diff --git a/scripts/core/sxmo_hookmenu.sh b/scripts/core/sxmo_hookmenu.sh index 7640fb2..268f0f4 100755 --- a/scripts/core/sxmo_hookmenu.sh +++ b/scripts/core/sxmo_hookmenu.sh @@ -10,7 +10,7 @@ set -e # Find the hook by name in the current directory. filename() { - find "$SXMO_DEVICE_NAME/" . -name "sxmo_hook_$1.sh" -maxdepth 1 | head -n1 + find "$SXMO_DEVICE_NAME/" . -maxdepth 1 -name "sxmo_hook_$1.sh" | head -n1 } copy() { @@ -20,7 +20,7 @@ copy() { file="$(filename "$1")" if [ ! -e "$file" ]; then cd "$(xdg_data_path sxmo/default_hooks)" || return - file="$(find "$SXMO_DEVICE_NAME/" . -name "sxmo_hook_$1.sh" -maxdepth 1 | head -n1)" + file="$(find "$SXMO_DEVICE_NAME/" . -maxdepth 1 -name "sxmo_hook_$1.sh" | head -n1)" [ -e "$file" ] && cp "$file" "$XDG_CONFIG_HOME/sxmo/hooks/$file" fi }