aboutsummaryrefslogtreecommitdiff
path: root/bash/bashrc.d/mkcp.bash
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2015-03-11 10:37:02 +1300
committerTom Ryder <tom@sanctum.geek.nz>2015-03-11 10:37:02 +1300
commitb79acabd8a3aadd7ce0b09704f7ffcc7c889e9b3 (patch)
tree55244dcf47a464881517c7fe821d759d31ca0ece /bash/bashrc.d/mkcp.bash
parentExpand information on GnuPG setup a bit (diff)
downloaddotfiles-b79acabd8a3aadd7ce0b09704f7ffcc7c889e9b3.tar.gz
dotfiles-b79acabd8a3aadd7ce0b09704f7ffcc7c889e9b3.zip
Move mkcp shell function into correct dir
Diffstat (limited to 'bash/bashrc.d/mkcp.bash')
-rw-r--r--bash/bashrc.d/mkcp.bash5
1 files changed, 5 insertions, 0 deletions
diff --git a/bash/bashrc.d/mkcp.bash b/bash/bashrc.d/mkcp.bash
new file mode 100644
index 00000000..7770556a
--- /dev/null
+++ b/bash/bashrc.d/mkcp.bash
@@ -0,0 +1,5 @@
+# Copy files into created directory in one call
+mkcp() {
+ mkdir -p -- "${@: -1}" && cp -- "$@"
+}
+