mirror of
https://github.com/olexsmir/dotfiles.git
synced 2026-01-15 08:41:34 +02:00
Add zathura
This commit is contained in:
parent
e916fc2103
commit
633e8ad6cd
10 changed files with 98 additions and 68 deletions
30
bin/extract
30
bin/extract
|
|
@ -1,18 +1,18 @@
|
|||
#!/bin/sh
|
||||
case "$1" in
|
||||
*.tar.bz2) tar xjf $1 ;;
|
||||
*.tar.gz) tar xzf $1 ;;
|
||||
*.bz2) bunzip2 $1 ;;
|
||||
*.rar) unrar x $1 ;;
|
||||
*.gz) gunzip $1 ;;
|
||||
*.tar) tar xf $1 ;;
|
||||
*.tbz2) tar xjf $1 ;;
|
||||
*.tgz) tar xzf $1 ;;
|
||||
*.zip) unzip $1 ;;
|
||||
*.Z) uncompress $1 ;;
|
||||
*.7z) 7z x $1 ;;
|
||||
*.deb) ar x $1 ;;
|
||||
*.tar.xz) tar xf $1 ;;
|
||||
*.tar.zst) unzstd $1 ;;
|
||||
*) echo "'$1' is not a valid file" ;;
|
||||
*.tar.bz2) tar xjf $1 ;;
|
||||
*.tar.gz) tar xzf $1 ;;
|
||||
*.bz2) bunzip2 $1 ;;
|
||||
*.rar) unrar x $1 ;;
|
||||
*.gz) gunzip $1 ;;
|
||||
*.tar) tar xf $1 ;;
|
||||
*.tbz2) tar xjf $1 ;;
|
||||
*.tgz) tar xzf $1 ;;
|
||||
*.zip) unzip $1 ;;
|
||||
*.Z) uncompress $1 ;;
|
||||
*.7z) 7z x $1 ;;
|
||||
*.deb) ar x $1 ;;
|
||||
*.tar.xz) tar xf $1 ;;
|
||||
*.tar.zst) unzstd $1 ;;
|
||||
*) echo "'$1' is not a valid file" ;;
|
||||
esac
|
||||
|
|
|
|||
22
bin/giti
22
bin/giti
|
|
@ -3,6 +3,7 @@ function add() {
|
|||
echo $1 >> .gitignore
|
||||
echo "[.gitignore] Successful add '$1'."
|
||||
}
|
||||
|
||||
function del() {
|
||||
if [ -f '.gitignore' ]; then
|
||||
if [ "$(cat .gitignore|wc -l)" = "1" ]
|
||||
|
|
@ -13,9 +14,11 @@ function del() {
|
|||
fi
|
||||
echo "[.gitignore] Successful del '$1'."
|
||||
}
|
||||
|
||||
function edit() {
|
||||
sed -in "s|$1|$2|g" .gitignore
|
||||
}
|
||||
|
||||
function show() {
|
||||
if [ -f '.gitignore' ]; then
|
||||
if [ -f '/usr/bin/bat' ]
|
||||
|
|
@ -27,14 +30,13 @@ function show() {
|
|||
}
|
||||
|
||||
case "$1" in
|
||||
add|a) shift; add "$@" ;;
|
||||
del|d) shift; del "$@" ;;
|
||||
mv) shift; edit "$@" ;;
|
||||
show) shift; show ;;
|
||||
help) echo "add|a - [file name] add to ignore."
|
||||
echo "del|d - [file name] delete from ignore."
|
||||
echo "mv - [old] [new] file name for rename."
|
||||
echo "show - show ignore file."
|
||||
;;
|
||||
*) echo "Command is not valid. Type 'giti help' for help." ;;
|
||||
add|a) shift; add "$@" ;;
|
||||
del|d) shift; del "$@" ;;
|
||||
mv) shift; edit "$@" ;;
|
||||
show) shift; show ;;
|
||||
help) echo "add|a - [file name] add to ignore."
|
||||
echo "del|d - [file name] delete from ignore."
|
||||
echo "mv - [old] [new] file name for rename."
|
||||
echo "show - show ignore file." ;;
|
||||
*) echo "Command is not valid. Type 'giti help' for help." ;;
|
||||
esac
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue