aboutsummaryrefslogtreecommitdiff
path: root/unix/hlib/util.csh/mkbindist
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2015-07-08 20:46:52 -0400
committerJoseph Hunkeler <jhunkeler@gmail.com>2015-07-08 20:46:52 -0400
commitfa080de7afc95aa1c19a6e6fc0e0708ced2eadc4 (patch)
treebdda434976bc09c864f2e4fa6f16ba1952b1e555 /unix/hlib/util.csh/mkbindist
downloadiraf-linux-fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4.tar.gz
Initial commit
Diffstat (limited to 'unix/hlib/util.csh/mkbindist')
-rwxr-xr-xunix/hlib/util.csh/mkbindist80
1 files changed, 80 insertions, 0 deletions
diff --git a/unix/hlib/util.csh/mkbindist b/unix/hlib/util.csh/mkbindist
new file mode 100755
index 00000000..acf4a987
--- /dev/null
+++ b/unix/hlib/util.csh/mkbindist
@@ -0,0 +1,80 @@
+#!/bin/csh -f
+
+unset noclobber
+onintr cleanup_
+unalias cd cp cmp echo ln mv rm sed set grep ls chmod chown pwd touch sort which
+
+setenv path "(/sbin /usr/sbin /bin /usr/bin /usr/5bin /usr/ucb /etc /usr/etc $path /usr/local/bin /opt/local/bin /local/bin /home/local/bin /usr/openwin/bin /usr/X11R6/bin /usr/X11/bin)"
+
+# Utility aliases.
+alias PUT "mv -f \!*; chown $user \!$ " # [MACHDEP]
+alias BOLD_ON "(tput bold)"
+alias BOLD_OFF "(tput sgr0)"
+alias SO_ON "(tput smso)"
+alias SO_OFF "(tput sgr0)"
+
+alias DO_OK "(echo -n '[ '; BOLD_ON; echo -n ' OK '; BOLD_OFF; echo ' ]')"
+alias DO_WARN "(echo -n '[ '; BOLD_ON; echo -n 'WARN'; BOLD_OFF; echo ' ]')"
+alias DO_FAIL "(echo -n '[ '; SO_ON; echo -n 'FAIL'; SO_OFF; echo ' ]')"
+
+alias ERRMSG "(echo -n ' ';BOLD_ON;echo -n 'ERROR: ' ;BOLD_OFF; echo \!*)"
+alias WARNING "(echo -n ' ';BOLD_ON;echo -n 'WARNING: ';BOLD_OFF; echo \!*)"
+alias NEWLINE "(echo '')"
+
+
+
+# set echo
+
+if (! $?iraf) then
+ echo ""
+ echo "Error: You must have the iraf env variable defined !"
+ echo ""
+ exit 1
+endif
+
+set exec = yes
+set arch = `$iraf/unix/hlib/irafarch.csh -actual`
+
+
+#=============================================================================
+# Process any command line arguments.
+#=============================================================================
+while ("$1" != "")
+ switch ("$1")
+ case -n: # no execute
+ set exec = no
+ breaksw
+ default:
+ ERRMSG "$0: unknown argument $1"
+ breaksw
+ endsw
+
+ if ("$2" == "") then
+ break
+ else
+ shift
+ endif
+end
+
+
+
+#----------------------------------
+# Determine platform architecture.
+#----------------------------------
+
+set mach = `$iraf/unix/hlib/irafarch.csh -actual`
+set hmach = `$iraf/unix/hlib/irafarch.csh -actual`
+
+echo "mach = " $mach
+echo "hmach = " $hmach
+
+make generic
+
+echo -n "Making $arch binary distribution ...."
+ make generic
+ if ($exec == "yes") then
+ tar czf ../${arch}-bin.tar.gz bin.$arch */bin.$arch extern/*/bin.$arch
+ else
+ echo "tar czf ../${arch}-bin.tar.gz bin.$arch */bin.$arch extern/*/bin.$arch"
+ endif
+echo " Done"