remove configuration function and create config array
This commit is contained in:
parent
af864dee5c
commit
5a6fec8213
22
ysm.sh
22
ysm.sh
|
@ -11,20 +11,14 @@ default_action="increment"
|
|||
default_path="$HOME/.ysess"
|
||||
default_s_path="$HOME/.ysess/*.ysess"
|
||||
|
||||
Configure() {
|
||||
echo Configuring
|
||||
case "$1" in
|
||||
name ) echo -n "last.ysess";;
|
||||
format ) echo -n "+%x_%H:%M:%S";;
|
||||
action ) echo -n "increment";;
|
||||
path ) echo -n "$HOME/.ysess";;
|
||||
s_path ) echo -n "$HOME/.ysess/*.ysess";;
|
||||
esac
|
||||
}
|
||||
|
||||
name="$default_name"
|
||||
date_format="$default_date_format"
|
||||
action="$default_action"
|
||||
config=(
|
||||
[extension]="ysess"
|
||||
[name]="last.$extension"
|
||||
[format]="+%d%m%Y_%H%M%S"
|
||||
[action]="increment"
|
||||
[path]="$HOME/.ysess"
|
||||
[s_path]="$HOME/.ysess/*.ysess"
|
||||
)
|
||||
|
||||
CreateFiles() {
|
||||
if [ ! -d "$default_path" ]; then
|
||||
|
|
Loading…
Reference in New Issue