remove configuration function and create config array

dev
Joe 3 years ago
parent af864dee5c
commit 5a6fec8213
Signed by: joe
GPG Key ID: 8595A3F8F2CE1B74
  1. 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…
Cancel
Save