diff options
| author | Teddy Wing | 2016-07-21 18:43:31 -0400 |
|---|---|---|
| committer | Teddy Wing | 2016-07-21 18:45:34 -0400 |
| commit | 260882fdaf5441140469a35ec954818b7b1100b2 (patch) | |
| tree | 278749ff551c02a30e6b9d477f345ae30cd708c6 | |
| parent | 70fc8f255abee76abd646ff6dd8c7b1cd87f264e (diff) | |
| download | qcd-260882fdaf5441140469a35ec954818b7b1100b2.tar.bz2 | |
qcd: Add `setup` function
Should be run before accessing the database to set up configuration
directories necessary for the command to work.
Right now I'm not using the default directories, instead overriding the
`QCD_DATABASE_FILE` variable on the shell for a custom database
location. Haven't tested this yet, but figured I'd commit it and get
back to it later.
| -rwxr-xr-x | qcd | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -22,6 +22,10 @@ Usage: __EOF__ } +function setup () { + mkdir -p $QCD_CONFIG_DIR +} + function absolute_path () { (cd "$(dirname '$1')" &>/dev/null && printf "%s/%s" "$PWD" "${1##*/}") } @@ -32,6 +36,8 @@ function qcd () { return fi + # setup + local command=$1 case $command in |
