Helpful bins

This commit is contained in:
Daniel Flanagan 2019-12-05 16:09:52 -06:00
parent 3a8eb5d475
commit 16895af798
3 changed files with 19 additions and 0 deletions

5
bin/archive Executable file
View File

@ -0,0 +1,5 @@
#!/usr/bin/env bash
archive_name="${1}"; shift
tar czvf "${archive_name}.tar.gz" ${@}
echo "Archive created at: ${archive_name}"

5
bin/clip Executable file
View File

@ -0,0 +1,5 @@
#!/usr/bin/env bash
xclip -selection primary
xclip -selection primary -out | xclip -selection clipboard
xclip -selection primary -out | xclip -selection secondary

9
bin/unarchive Executable file
View File

@ -0,0 +1,9 @@
#!/usr/bin/env bash
archive_name="${1}"; shift
to_dir="$(basename $archive_name)"
mkdir -p "${to_dir}"
pushd "${to_dir}"
tar xzvf "${archive_name}"
echo "Unarchived to: ${to_dir}"
popd