summaryrefslogtreecommitdiffstats
path: root/bashrc
diff options
context:
space:
mode:
authorAlexander Sulfrian <alexander@sulfrian.net>2009-10-21 13:11:52 +0200
committerAlexander Sulfrian <alexander@sulfrian.net>2009-10-21 13:11:52 +0200
commitce308a8bae777e0c7019adb0bca82d5cac9eb086 (patch)
tree59d9cf56dc1021e4d03fcfd5c8c76ef1aa215901 /bashrc
parent26e619a342aa3495df9b358d110ff76b5b78eb41 (diff)
downloaddotfiles-ce308a8bae777e0c7019adb0bca82d5cac9eb086.tar.gz
dotfiles-ce308a8bae777e0c7019adb0bca82d5cac9eb086.tar.xz
dotfiles-ce308a8bae777e0c7019adb0bca82d5cac9eb086.zip
added custom scripts in dotfiles and added folder to path
Diffstat (limited to 'bashrc')
-rwxr-xr-xbashrc/bin/copy14
-rwxr-xr-xbashrc/bin/emerge4
-rwxr-xr-xbashrc/bin/maildirmake10
-rwxr-xr-xbashrc/bin/mklnx7
-rwxr-xr-xbashrc/bin/remerge11
-rw-r--r--bashrc/common/alias.sh8
-rw-r--r--bashrc/common/shopt.sh3
7 files changed, 49 insertions, 8 deletions
diff --git a/bashrc/bin/copy b/bashrc/bin/copy
new file mode 100755
index 0000000..0144fe5
--- /dev/null
+++ b/bashrc/bin/copy
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+if [[ -z "$1" ]] ; then
+ echo "Usage:"
+ echo -en "\t"
+ echo "$(basename $0) <files/directories>"
+ exit 1
+fi
+
+# encode files suitable for copy&paste into other terminals
+STR=$(tar cj $@ | base64; exit $PIPESTATUS) || exit $?
+echo "cat << E=O=F | base64 -d | tar xj"
+echo "$STR"
+echo "E=O=F"
diff --git a/bashrc/bin/emerge b/bashrc/bin/emerge
new file mode 100755
index 0000000..cca0a8b
--- /dev/null
+++ b/bashrc/bin/emerge
@@ -0,0 +1,4 @@
+#!/bin/bash
+
+export PROMPT_COMMAND=""
+/usr/bin/emerge "$@"
diff --git a/bashrc/bin/maildirmake b/bashrc/bin/maildirmake
new file mode 100755
index 0000000..5ba5f11
--- /dev/null
+++ b/bashrc/bin/maildirmake
@@ -0,0 +1,10 @@
+# create maildir style directories
+
+if [[ -z "$1" ]] ; then
+ echo "Usage:"
+ echo -en "\t"
+ echo "$(basename $0) <directory>"
+ exit 1
+fi
+
+mkdir -m 0700 $1/{,cur,new,tmp}
diff --git a/bashrc/bin/mklnx b/bashrc/bin/mklnx
new file mode 100755
index 0000000..4fcd52e
--- /dev/null
+++ b/bashrc/bin/mklnx
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+set -e
+
+make "$@"
+make modules_install
+make install
diff --git a/bashrc/bin/remerge b/bashrc/bin/remerge
new file mode 100755
index 0000000..9d654f8
--- /dev/null
+++ b/bashrc/bin/remerge
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+if [[ -z "$1" ]] ; then
+ echo "Usage:"
+ echo -en "\t"
+ echo "$(basename $0) <package-atom>"
+ exit 1
+fi
+
+export PROMPT_COMMAND=""
+/usr/bin/emerge "$@" --usepkg=n
diff --git a/bashrc/common/alias.sh b/bashrc/common/alias.sh
index 5d73269..c1e9b6b 100644
--- a/bashrc/common/alias.sh
+++ b/bashrc/common/alias.sh
@@ -34,14 +34,6 @@ mkcd() {
mkdir -p $1 && cd $1
}
-# encode files suitable for copy&paste into other terminals
-copy() {
- STR=$(tar cj $@ | perl -MMIME::Base64 -e 'print MIME::Base64::encode(join("", <>))' - ; exit $PIPESTATUS) || return $?
- echo "cat << E=O=F | perl -MMIME::Base64 -e 'print MIME::Base64::decode(join(\"\", <>))' - | tar xj"
- echo "$STR"
- echo "E=O=F"
-}
-
# create tarball of one directory
mktar() {
[[ -z "$1" ]] && return 1
diff --git a/bashrc/common/shopt.sh b/bashrc/common/shopt.sh
index 07a796a..2e27c43 100644
--- a/bashrc/common/shopt.sh
+++ b/bashrc/common/shopt.sh
@@ -1,5 +1,8 @@
# bash configuration
+# local programs
+export PATH="${HOME}/.bash/bin:${PATH}"#
+
# basic search path for chdir
export CDPATH=".:~"