Helpful bins
This commit is contained in:
parent
3a8eb5d475
commit
16895af798
3 changed files with 19 additions and 0 deletions
5
bin/archive
Executable file
5
bin/archive
Executable 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
5
bin/clip
Executable 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
9
bin/unarchive
Executable 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
|
Reference in a new issue