Mercurial > ec-dotfiles
changeset 279:33d0cb669e1f
Merge.
author | Edho Arief <edho@myconan.net> |
---|---|
date | Thu, 08 Dec 2011 19:12:53 +0700 |
parents | 53bbc9673f87 (current diff) 8e451b27baa5 (diff) |
children | 758dd58bb3cb 87ce8cfdb8d4 |
files | rc/bash |
diffstat | 3 files changed, 46 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/bin/dfi Thu Dec 08 19:12:53 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 08 19:12:53 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 08 19:11:57 2011 +0700 +++ b/rc/bash Thu Dec 08 19:12:53 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 @@ -74,13 +74,19 @@ _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" if command -v gls > /dev/null 2>&1; then _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) @@ -89,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*) @@ -137,6 +143,13 @@ fi done +for supbindir in {"${HOME}/app","/opt"}/supervisor{,d}/bin; do + if [ -d "${supbindir}" ]; then + PATH="${PATH}:${supbindir}" + break + fi +done + case "${TERM}" in xterm*|screen*|dtterm*) PROMPT_COMMAND='echo -ne "\033]0;'"${USER:-$LOGNAME}@$(uname -n)"': ${PWD}\007";'"${PROMPT_COMMAND}"