Commit 7dd02326 authored by TomKellyGenetics's avatar TomKellyGenetics
Browse files

set up install and removal of manual with make

parent 134d29a4
Loading
Loading
Loading
Loading
+4 −5
Original line number Diff line number Diff line
@@ -7,7 +7,7 @@ export ROOT_DIR=$(shell pwd)
#
all: reference

clean: reference-clean
clean: reference-clean manual-clean

# Targets for python builds

@@ -27,10 +27,9 @@ reference-clean:
	rm -Rf  test/cellranger_reference/cellranger-tiny-ref/3.0.0
	rm -Rf  test/cellranger_reference/cellranger-tiny-ref/1.2.0

# Copy to manuals (requires root priviledges
manual:
	bash man/INSTALL

.PHONY: print_vars

print_vars: manual
	echo $(CONFIG)	
manual-clean:
	bash man/REMOVE

man/REMOVE

0 → 100755
+33 −0
Original line number 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
if [[ -f  man/launch_universc.sh.1 ]]
    then
    rm man/launch_universc.sh.1
fi
if [[ -f ${MANDIR}/man1/launch_universc.sh.1 ]]
    then
    rm ${MANDIR}/man1/launch_universc.sh.1
fi
if [[ -f ${MANDIR}/man1/launch_universc.sh.1.gz ]] 
    then
    rm ${MANDIR}/man1/launch_universc.sh.1.gz
fi