db-migration.sh
Go to the documentation of this file.
1 #!/bin/bash
2 
3 function set_file_names() {
4  file=$1
5  base=${file%.db}
6  new_file=${base}_new.db
7  if ! [ -z "$2" ]
8  then
9  new_file=$2
10  fi
11  temp_file=$(mktemp /tmp/timeTracker-migration-script.XXXXXX)
12 }
13 
14 function validate_new_file() {
15  if [ -e $1 ]
16  then
17  echo "New file (\"$1\") already exists."
18  echo "Please supply different new-file name or remove it."
19  exit 2
20  fi
21 }