From b9e05d06fe3f4177f08edc149565bf4f5ea760bc Mon Sep 17 00:00:00 2001 From: Calvin Rose Date: Sat, 19 Oct 2019 18:00:29 -0500 Subject: [PATCH] Update amalg step. --- tools/amalg.janet | 3 +++ tools/removecr.janet | 8 +++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/tools/amalg.janet b/tools/amalg.janet index c571a7e6..c8cf35f9 100644 --- a/tools/amalg.janet +++ b/tools/amalg.janet @@ -10,3 +10,6 @@ # Body (each path (tuple/slice (dyn :args) 1) (print (slurp path))) + +# maybe will help +(:flush stdout) diff --git a/tools/removecr.janet b/tools/removecr.janet index 305def6b..97016569 100644 --- a/tools/removecr.janet +++ b/tools/removecr.janet @@ -2,8 +2,6 @@ # windows may add bad line endings, we can just force removal # with this script. (def fname ((dyn :args) 1)) -(with [f (file/open fname :rb+)] - (def source (:read f :all)) - (def new-source (string/replace-all "\r" "" source)) - (:seek f :set 0) - (:write f new-source)) +(def input (slurp fname :rb)) +(def new-source (string/replace-all "\r" "" source)) +(spit fname new-source :wb)