Introduction
Introduction Statistics Contact Development Disclaimer Help
Add ability to choose korn shell implementation - blind - suckless command-line…
git clone git://git.suckless.org/blind
Log
Files
Refs
README
LICENSE
---
commit 12e20aecd0ef73523b344d4efc4c54d4174c3880
parent d391ca2ddb719d2478e824dec082b849613eeda6
Author: Mattias Andrée <[email protected]>
Date: Sun, 23 Jul 2017 23:07:08 +0200
Add ability to choose korn shell implementation
Signed-off-by: Mattias Andrée <[email protected]>
Diffstat:
M Makefile | 9 +++++++--
M blind-primary-key | 2 +-
M config.mk | 5 +++++
3 files changed, 13 insertions(+), 3 deletions(-)
---
diff --git a/Makefile b/Makefile
@@ -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
@@ -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
@@ -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):' $(KS…
cd -- "$(DESTDIR)$(PREFIX)/bin" && chmod 755 $(BIN) $(SCRIPTS)
mkdir -p -- "$(DESTDIR)$(MANPREFIX)/man1"
set -e && for m in $(MAN1); do \
@@ -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):' $(KS…
cd -- "$(DESTDIR)$(PREFIX)/bin" && chmod 755 -- blind-single-colour $(…
mkdir -p -- "$(DESTDIR)$(MANPREFIX)/man1"
set -e && for m in $(MAN1); do \
diff --git a/blind-primary-key b/blind-primary-key
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
set -e
diff --git a/config.mk b/config.mk
@@ -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
You are viewing proxied material from suckless.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.