summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorflu0r1ne <flu0r1ne@flu0r1ne.net>2021-09-27 00:05:53 -0500
committerflu0r1ne <flu0r1ne@flu0r1ne.net>2021-09-27 00:05:53 -0500
commite0869144367ef00f64eaef5af961ce5134173c53 (patch)
tree596740a7f845b9bee716e30d668cdced5138ac6f
parent9285ee94806349f32fd4b9dba707ab5ffae7fa8b (diff)
downloadextra-ros-utils-e0869144367ef00f64eaef5af961ce5134173c53.tar.xz
extra-ros-utils-e0869144367ef00f64eaef5af961ce5134173c53.zip
Add makefile for easy installation
-rw-r--r--Makefile20
-rwxr-xr-xtf2_watch (renamed from tf2_watch.bash)7
2 files changed, 24 insertions, 3 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..63779dd
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,20 @@
+BINS :=tf2_watch
+
+ifeq ($(PREFIX),)
+ PREFIX := /usr/local
+endif
+
+ifeq ($(BINDIR),)
+ BINDIR := /bin
+endif
+
+install:
+ mkdir -p $(DESTDIR)$(PREFIX)$(BINDIR)/
+ for bin in $(BINS); do \
+ install -m 755 $$bin $(DESTDIR)$(PREFIX)$(BINDIR)/; \
+ done
+
+uninstall:
+ for bin in $(BINS); do \
+ rm -rf $(DESTDIR)$(BINDIR)/$$bin; \
+ done
diff --git a/tf2_watch.bash b/tf2_watch
index 02e2580..b8e205b 100755
--- a/tf2_watch.bash
+++ b/tf2_watch
@@ -9,10 +9,11 @@ if [ -z "${TIME_BETWEEN_SAMPLES}" ]; then
TIME_BETWEEN_SAMPLES="25"
fi
-GENERATED="frames.pdf"
+GENERATED_PDF="frames.pdf"
+GENERATED_RV="frames.gv"
cleanstop() {
- rm -rf "./${GENERATED}"
+ rm -rf "./${GENERATED_PDF}" "./${GENERATED_RV}"
pkill mupdf
}
@@ -25,7 +26,7 @@ while : ; do
rosrun tf2_tools view_frames.py
if [ -z "${MU_LAUNCHED}" ]; then
- mupdf "${GENERATED}" &
+ mupdf "${GENERATED_PDF}" &
MU_LAUNCHED="y"
else
pkill -hup mupdf