[Pm-utils] [PATCH 2/2] Added a little script to build and install pm-utils in a temp

Victor Lowther victor.lowther at gmail.com
Fri Feb 8 18:07:58 PST 2008


---
 test-pm-utils |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/test-pm-utils b/test-pm-utils
new file mode 100755
index 0000000..1f834a0
--- /dev/null
+++ b/test-pm-utils
@@ -0,0 +1,18 @@
+#!/bin/bash
+opwd="$PWD"
+tgt="/tmp/pm-utils-$$"
+mkdir -p "$tgt"
+trap 'rm -rf "$tgt"' 0
+cd "$tgt" && \
+cp -t "$tgt" -a "${opwd}"/* && \
+autoreconf --install && \
+./configure "--prefix=$tgt/target" && \
+make && \
+make install &&  {
+	echo "Build sucessfull.  Dropping to a shell to test."
+	echo "Files were installed in $tgt/target"
+} || echo "Build failed.  Dropping to a shell so you can see what happened."
+echo "Exiting from this shell will erase $tgt"
+cd "$tgt/" && \
+bash -i && \
+cd "$opwd"
-- 
1.5.3.8



More information about the Pm-utils mailing list