]> code.delx.au - gnu-emacs-elpa/blobdiff - packages/loc-changes/install-from-git.sh
Add 'packages/loc-changes/' from commit '8447baff7cb4839ef8d1d747a14e5da85d0cee5b'
[gnu-emacs-elpa] / packages / loc-changes / install-from-git.sh
diff --git a/packages/loc-changes/install-from-git.sh b/packages/loc-changes/install-from-git.sh
new file mode 100755 (executable)
index 0000000..5bed782
--- /dev/null
@@ -0,0 +1,36 @@
+#!/bin/bash
+# Install emacs-dbgr from git
+run_cmd() {
+    echo "--- Running command: $@"
+    $@
+    rc=$?
+    echo "--- $@ exit status is $?"
+    return $rc
+}
+
+if (( $(id -u) != 0)) ; then 
+    need_sudo='sudo'
+else
+    need_sudo=''
+fi
+for program in git make $need_sudo ; do
+    if ! which $program >/dev/null 2>&1 ; then
+       echo "Cant find program $program in $PATH"
+       exit 1
+    fi
+done
+
+packages=emacs-{test-simple,load-relative,loc-changes,dbgr}
+for pkg in $packages ; do 
+    echo '******************************************'
+    echo Trying to install ${pkg}...
+    echo '******************************************'
+    run_cmd git clone http://github.com/rocky/${pkg}.git
+    (cd $pkg && \
+        run_cmd $SHELL ./autogen.sh && \
+       run_cmd ./configure && \
+       run_cmd make && \
+       run_cmd make check && \
+        run_cmd $need_sudo make install
+    )
+done