changeset 285:624eead87f86

Merge.
author Edho Arief <edho@myconan.net>
date Thu, 22 Dec 2011 15:00:25 +0700
parents 5ef99c47e636 (current diff) 87ce8cfdb8d4 (diff)
children 5bed5473ab29
files
diffstat 3 files changed, 54 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bin/dfi	Thu Dec 22 15:00:25 2011 +0700
@@ -0,0 +1,13 @@
+#!/usr/bin/env python
+
+import os
+import sys
+
+rows = sys.stdin.readlines()
+
+for row in rows:
+  if row.find(' ', 1, 49) == -1:
+    row = row[0:48] + ' ' + row[48:]
+  data = row.split(None, 5)
+  print '|'.join(data)
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bin/startssl-nginx	Thu Dec 22 15:00:25 2011 +0700
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+_err_fatal() {
+  printf "%s\n" "$*"
+  exit 1
+}
+
+certfile="${1}"
+
+command -v curl 2> /dev/null || _err_fatal "This script requires cURL. Please install it first."
+test -z "${certfile}" && _err_fatal "Please specify certificate file."
+test -f "${certfile}" && _err_fatal "Error reading certificate file ${certfile}."
+
+for ca in sub.class1.server.ca.pem ca.pem; do
+  curl "http://www.startssl.com/certs/${ca}" >> "${certfile}"
+done
+
--- a/rc/bash	Thu Dec 22 15:00:08 2011 +0700
+++ b/rc/bash	Thu Dec 22 15:00:25 2011 +0700
@@ -17,7 +17,7 @@
 export PATH="${HOME}/.ecos_bin:${HOME}/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin"
 
 shopt -s histappend
-PROMPT_COMMAND='history -a'
+PROMPT_COMMAND="history -a"
 export HISTFILESIZE=10000
 export HISTCONTROL=ignoredups
 
@@ -69,6 +69,16 @@
       _has_gnu_grep=y
       _grep="ggrep"
     fi
+    if command -v gls > /dev/null 2>&1; then
+      _has_gnu_ls=y
+      _ls="gls"
+    fi
+  ;;
+  FreeBSD)
+    # Invalid characters when using en_US.UTF-8.
+    alias man="man -o"
+    # Multi CPU awesomeness.
+    alias top="top -P"
   ;;
   OpenBSD)
     PATH="${PATH}:/usr/X11R6/bin"
@@ -76,7 +86,7 @@
       _has_gnu_ls=y
       _ls="gls"
     elif command -v colorls > /dev/null 2>&1; then
-      alias ls='colorls -F'
+      alias ls="colorls -F"
     fi
   ;;
   NetBSD)
@@ -85,7 +95,7 @@
       _has_gnu_ls=y
       _ls="gls"
     elif command -v colorls > /dev/null 2>&1; then
-      alias ls='colorls -F'
+      alias ls="colorls -F"
     fi
   ;;
   CYGWIN*)
@@ -126,9 +136,18 @@
 
 # Mercurial is optional since it will be inconsistent with ssh ... hg if this one gets priority.
 # And use only one.
-for hgdir in {"${HOME}/app","/opt"}/mercurial; do
-  if [ -x "${hgdir}/hg" ]; then
+for hgdir in {"${HOME}/app","/opt"}/mercurial{,/bin}; do
+  hgbin="${hgdir}/hg"
+  if [ -x "${hgbin}" ]; then
     PATH="${PATH}:${hgdir}"
+    alias nhg="${hgbin}"
+    break
+  fi
+done
+
+for supbindir in {"${HOME}/app","/opt"}/supervisor{,d}/bin; do
+  if [ -d "${supbindir}" ]; then
+    PATH="${PATH}:${supbindir}"
     break
   fi
 done