(wrong string) ée

From: <git_AT_suckless.org>
Date: Sun, 23 Jul 2017 23:07:30 +0200 (CEST)

commit 12e20aecd0ef73523b344d4efc4c54d4174c3880
Author: Mattias Andrée <maandree_AT_kth.se>
AuthorDate: Sun Jul 23 23:07:08 2017 +0200
Commit: Mattias Andrée <maandree_AT_kth.se>
CommitDate: Sun Jul 23 23:07:08 2017 +0200

    Add ability to choose korn shell implementation
    
    Signed-off-by: Mattias Andrée <maandree_AT_kth.se>

diff --git a/Makefile b/Makefile
index a19e7bf..8f6426b 100644
--- a/Makefile
+++ b/Makefile
_AT_@ -105,12 +105,14 @@ BIN =\
 # blind-kernel
 # blind-temporal-mean
 
-SCRIPTS =\
- blind-primary-key\
+SH_SCRIPTS =\
         blind-rotate-90\
         blind-rotate-180\
         blind-rotate-270
 
+KSH_SCRIPTS =\
+ blind-primary-key
+
 COMMON_OBJ =\
         util.o\
         stream.o
_AT_@ -153,6 +155,7 @@ EXAMPLEFILES =\
 
 COMMON_SRC = $(COMMON_SRC:.o=.c)
 SRC = $(BIN:=.c) $(COMMON_SRC)
+SCRIPTS = $(SH_SCRIPTS) $(KSH_SCRIPTS)
 MAN1 = $(BIN:=.1) $(SCRIPTS:=.1)
 MAN7 = blind.7
 
_AT_@ -195,6 +198,7 @@ platform.h: generate-macros
 install: all
         mkdir -p -- "$(DESTDIR)$(PREFIX)/bin"
         cp -f -- $(BIN) $(SCRIPTS) "$(DESTDIR)$(PREFIX)/bin"
+ cd "$(DESTDIR)$(PREFIX)/bin" && sed -i '1s:bash$$:$(KORN_SHELL):' $(KSH_SCRIPTS)
         cd -- "$(DESTDIR)$(PREFIX)/bin" && chmod 755 $(BIN) $(SCRIPTS)
         mkdir -p -- "$(DESTDIR)$(MANPREFIX)/man1"
         set -e && for m in $(MAN1); do \
_AT_@ -216,6 +220,7 @@ install-mcb: mcb
         rm -f -- "$(DESTDIR)$(PREFIX)/bin/blind-single-colour"
         cp -f -- blind-mcb "$(DESTDIR)$(PREFIX)/bin/blind-single-colour"
         cp -f -- $(SCRIPTS) "$(DESTDIR)$(PREFIX)/bin"
+ cd "$(DESTDIR)$(PREFIX)/bin" && sed -i '1s:bash$$:$(KORN_SHELL):' $(KSH_SCRIPTS)
         cd -- "$(DESTDIR)$(PREFIX)/bin" && chmod 755 -- blind-single-colour $(SCRIPTS)
         mkdir -p -- "$(DESTDIR)$(MANPREFIX)/man1"
         set -e && for m in $(MAN1); do \
diff --git a/blind-primary-key b/blind-primary-key
index cbf421a..bcfad92 100755
--- a/blind-primary-key
+++ b/blind-primary-key
_AT_@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 
 set -e
 
diff --git a/config.mk b/config.mk
index ae035ef..0608008 100644
--- a/config.mk
+++ b/config.mk
_AT_@ -5,6 +5,11 @@ VERSION = 1.1
 PREFIX = /usr/local
 MANPREFIX = $(PREFIX)/share/man
 
+# Dependencies
+KORN_SHELL = bash
+# Known to work: bash ksh
+# Does not work: mksh loksh oksh dash
+
 # Commands
 LN = ln -s
 
Received on Sun Jul 23 2017 - 23:07:30 CEST

This archive was generated by hypermail 2.3.0 : Sun Jul 23 2017 - 23:13:32 CEST