summaryrefslogtreecommitdiffstats
path: root/bashrc/bin/copy
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/bin/copy
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 '')
-rwxr-xr-xbashrc/bin/copy14
1 files changed, 14 insertions, 0 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"