From 177b60e6c29428dc53d05198832cb4386eaf9164 Mon Sep 17 00:00:00 2001 From: Arun Prakash Jana Date: Fri, 14 May 2021 08:47:15 +0530 Subject: [PATCH] shellcheck fixes + use the last known good commit --- misc/musl/musl-static-ubuntu.sh | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/misc/musl/musl-static-ubuntu.sh b/misc/musl/musl-static-ubuntu.sh index b8b0aeb7..2ee3e1ed 100755 --- a/misc/musl/musl-static-ubuntu.sh +++ b/misc/musl/musl-static-ubuntu.sh @@ -5,8 +5,10 @@ # netbsd-curses: https://github.com/sabotage-linux/netbsd-curses # musl libc: https://www.musl-libc.org/ # +# Dependencies: git +# # Notes: -# - Run the script within the top-level nnn directory +# - run the script within the top-level nnn directory # - installs musl and downloads netbsd-curses library # # Tested on Ubuntu 20.04 x86_64 @@ -22,12 +24,21 @@ BIN=nnn-musl-static sudo apt install -y --no-install-recommends musl musl-dev musl-tools # Get netbsd-curses -[ ! -d "./netbsd-curses" ] && git clone https://github.com/sabotage-linux/netbsd-curses --depth=1 +[ ! -d "./netbsd-curses" ] && git clone https://github.com/sabotage-linux/netbsd-curses -# Compile the static libraries +# Enter the library dir cd netbsd-curses -[ ! -d "./libs" ] && mkdir libs || rm -vf libs/* -make CC=musl-gcc CFLAGS=-O3 LDFLAGS=-static all-static -j$((`nproc`+1)) + +# Get the last known good commit before cursor stuck issue is introduced +git checkout f1fa19a1f36a25d0971b3d08449303e6af6f3da5 + +# Compile the static netbsd-curses libraries +if [ ! -d "./libs" ]; then + mkdir libs +else + rm -vf libs/* +fi +make CC=musl-gcc CFLAGS=-O3 LDFLAGS=-static all-static -j$(($(nproc)+1)) cp -v libcurses/libcurses.a libterminfo/libterminfo.a libs/ # Compile nnn