From c614b3727595d4cb45d52f254c436b7ae39f5e99 Mon Sep 17 00:00:00 2001 From: mutantturkey Date: Sat, 12 Jun 2010 02:06:11 -0400 Subject: added a script to automagically sort/remove duplicates, i had it for a while, now its for everyone. updated makefile to install the binary as sb-binary, and the script as sb --- Makefile | 9 +++++++-- sb-script | 10 ++++++++++ 2 files changed, 17 insertions(+), 2 deletions(-) create mode 100755 sb-script diff --git a/Makefile b/Makefile index 7bd468f..9501e5e 100644 --- a/Makefile +++ b/Makefile @@ -32,7 +32,7 @@ clean: dist: clean @echo creating dist tarball @mkdir -p sb-${VERSION} - @cp -R Makefile config.mk ${SRC} sb-${VERSION} + @cp -R Makefile config.mk sb sb-binary ${SRC} sb-${VERSION} @tar -cf sb-${VERSION}.tar sb-${VERSION} @gzip sb-${VERSION}.tar @rm -rf sb-${VERSION} @@ -40,12 +40,17 @@ dist: clean install: all @echo installing executable file to ${DESTDIR}${PREFIX}/bin @mkdir -p ${DESTDIR}${PREFIX}/bin - @cp -f sb ${DESTDIR}${PREFIX}/bin + @cp -f sb ${DESTDIR}${PREFIX}/bin/sb-binary + @chmod 755 ${DESTDIR}${PREFIX}/bin/sb-binary + @cp -f sb-script ${DESTDIR}${PREFIX}/bin/sb @chmod 755 ${DESTDIR}${PREFIX}/bin/sb + + uninstall: @echo removing executable file from ${DESTDIR}${PREFIX}/bin @rm -f ${DESTDIR}${PREFIX}/bin/sb + @rm -f ${DESTDIR}${PREFIX}/bin/sb-binary .PHONY: all options clean dist install uninstall diff --git a/sb-script b/sb-script new file mode 100755 index 0000000..8390c14 --- /dev/null +++ b/sb-script @@ -0,0 +1,10 @@ +#!/bin/sh + + +#remove duplicates +awk '!x[$0]++' ~/.history | sponge ~/.history + + +#execute +/usr/bin/sb-binary + -- cgit v1.2.3