Commit 96c160b9 authored by TomKellyGenetics's avatar TomKellyGenetics
Browse files

install manual with make

parent 11747400
Loading
Loading
Loading
Loading
+19 −0
Original line number Original line Diff line number Diff line
@@ -26,3 +26,22 @@ reference-clean:
	echo "removing pre-generated cellranger reference files"
	echo "removing pre-generated cellranger reference files"
	rm -Rf  test/cellranger_reference/cellranger-tiny-ref/3.0.0
	rm -Rf  test/cellranger_reference/cellranger-tiny-ref/3.0.0
	rm -Rf  test/cellranger_reference/cellranger-tiny-ref/1.2.0
	rm -Rf  test/cellranger_reference/cellranger-tiny-ref/1.2.0

manual:
	# add manual directory to PATH if not already found
	## check config for Linux
	if [[ -f /etc/manpath.config ]]; then CONFIG=$(echo /etc/manpath.config); fi
	## check config for Mac
	if [[ -f /etc/manpaths ]]; then CONFIG:=$(echo /etc/manpaths); fi
	echo $(CONFIG)
	#if [[ ! -z $CONFIG ]];  then MANDIR=`tail -n 1 ${CONFIG}`; else if [[ ! -z $MANPATH ]]; then SHELL_RC=`echo ~/.${0}rc`; echo "export MANPATH=/usr/local/man" >> $SHELL_RC; MANDIR=`echo ${MANPATH} | cut -d: -f1`; fi; fi
	#mkdir -p ${MANDIR}/man1
	#cp man/convert.sh man/convert.sh.1
	#mv man/convert.sh.1 ${MANDIR}/man1

CONFIG:="/etc/manpaths"

.PHONY: print_vars

print_vars:
	echo $(CONFIG)	

man/INSTALL

0 → 100755
+26 −0
Original line number Original line Diff line number Diff line
#! /bin/sh

# add manual directory to PATH if not already found
## check config for Linux
if [[ -f /etc/manpath.config ]]
    then CONFIG="/etc/manpath.config"
fi
## check config for Mac
if [[ -f /etc/manpaths ]]
    then CONFIG="/etc/manpaths"
fi
if [[ ! -z $CONFIG ]]
    then MANDIR=`tail -n 1 ${CONFIG}`
else if [[ ! -z $MANPATH ]]
    then
    SHELL_RC=`echo ~/.${0}rc`
    echo "export MANPATH=/usr/local/man" >> $SHELL_RC
    MANDIR=`echo ${MANPATH} | cut -d: -f1`
    fi
fi
#requires root priviledges
mkdir -p ${MANDIR}/man1
cp man/launch_universc.sh man/launch_universc.sh.1
mv man/launch_universc.sh.1 ${MANDIR}/man1/launch_universc.sh.1
gzip ${MANDIR}/man1/launch_universc.sh.1