-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathczip
More file actions
executable file
·36 lines (32 loc) · 1.43 KB
/
czip
File metadata and controls
executable file
·36 lines (32 loc) · 1.43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/usr/bin/env bash
#
# ############################################################################
# Project: scripts (none)
# File...: czip
# Created: Tuesday, 2020/03/03 - 18:44:19
# Author.: @fbnmtz, (fabiano.matoz@gmail.com)
# ~·~·~·~·~·~·~·~·~·~·~·~·~~·~·~·~·~·~·~·~·~·~·~·~·~~·~·~·~·~·~~·~·~·~·~·~·~·~
# Last Modified: Monday, 2024/12/09 - 17:38:37
# Modified By..: @fbnmtz, (fabiano.matoz@gmail.com)
# ~·~·~·~·~·~·~·~·~·~·~·~·~~·~·~·~·~·~·~·~·~·~·~·~·~~·~·~·~·~·~~·~·~·~·~·~·~·~
# Version: 1.1.0.40
# ~·~·~·~·~·~·~·~·~·~·~·~·~~·~·~·~·~·~·~·~·~·~·~·~·~~·~·~·~·~·~~·~·~·~·~·~·~·~
# Description:
# > create a backup zipped in a defaul destination
# ############################################################################
# HISTORY:
#
source "$xSHELL_INIT"
use args utils czip.lib
xrequirements zip unzip
xarg --id -c,--create --var "f:c,source+r" --desc "create a new backup/zip file to default location"
xarg --id -x,--extract --var "f:x,backup+o" --desc "extract a existing backup/zip file to default location"
xarg --id -l,--list --var "f:l" --desc "list all existent backups"
xarg --id -r,--rm --var "f:r,backup+o" --desc "delete backup files"
xrun --xreject-unknow --xrequire-one --xversionrc --xcolors "$@"
case "$f" in
c) _create "$source" ;;
x) _extract ;;
l) _list ;;
r) _remove ;;
esac