From 45107fd6beb7f4532f11eba8d379631a3ccfd1c6 Mon Sep 17 00:00:00 2001 From: Oliver Caldwell Date: Sat, 12 Feb 2022 16:19:06 +0000 Subject: [PATCH] Allow embedding of aniseed.autoload --- fnl/aniseed/macros.fnl | 2 +- lua/aniseed/macros.fnl | 2 +- scripts/embed.sh | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/fnl/aniseed/macros.fnl b/fnl/aniseed/macros.fnl index 6617a03..436ce6f 100644 --- a/fnl/aniseed/macros.fnl +++ b/fnl/aniseed/macros.fnl @@ -124,7 +124,7 @@ ;; Only require autoload if it's used. (when (contains? mod-fns autoload-sym) - (table.insert result `(local ,autoload-sym (. (require :aniseed.autoload) :autoload))))) + (table.insert result `(local ,autoload-sym (. (require "aniseed.autoload") :autoload))))) ;; When we have some keys insert the key/vals pairs locals. ;; If this is empty we end up generating invalid Lua. diff --git a/lua/aniseed/macros.fnl b/lua/aniseed/macros.fnl index 6617a03..436ce6f 100644 --- a/lua/aniseed/macros.fnl +++ b/lua/aniseed/macros.fnl @@ -124,7 +124,7 @@ ;; Only require autoload if it's used. (when (contains? mod-fns autoload-sym) - (table.insert result `(local ,autoload-sym (. (require :aniseed.autoload) :autoload))))) + (table.insert result `(local ,autoload-sym (. (require "aniseed.autoload") :autoload))))) ;; When we have some keys insert the key/vals pairs locals. ;; If this is empty we end up generating invalid Lua. diff --git a/scripts/embed.sh b/scripts/embed.sh index e498377..017efeb 100755 --- a/scripts/embed.sh +++ b/scripts/embed.sh @@ -13,3 +13,4 @@ mkdir -p "lua/$2" rsync -avu --delete "deps/$1/${3:-lua/$1/}" "lua/$2/$1" find "lua/$2" -type f -name "*.lua" -exec sed -i "s/\"$1\./\"$2.$1./g" {} \; +find "lua/$2" -type f -name "*.fnl" -exec sed -i "s/\"$1\./\"$2.$1./g" {} \;