summaryrefslogtreecommitdiffstats
path: root/bin/copy
diff options
context:
space:
mode:
Diffstat (limited to 'bin/copy')
-rwxr-xr-xbin/copy14
1 files changed, 14 insertions, 0 deletions
diff --git a/bin/copy b/bin/copy
new file mode 100755
index 0000000..68d10ca
--- /dev/null
+++ b/bin/copy
@@ -0,0 +1,14 @@
+#!/usr/bin/env 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 cjf - "$@" | base64; exit $PIPESTATUS) || exit $?
+echo "cat << E=O=F | base64 -d | tar xj"
+echo "$STR"
+echo "E=O=F"