diff options
author | Næþ'n Lasseter <Næþ'n Lasseter nathan@bytemark.co.uk> | 2015-12-19 23:09:50 +0000 |
---|---|---|
committer | Næþ'n Lasseter <Næþ'n Lasseter nathan@bytemark.co.uk> | 2015-12-19 23:09:50 +0000 |
commit | 5c894855532f4529c9b0c0f74688b918930ed359 (patch) | |
tree | f6c7ed040e0f450ced6d6ffa65e6440338c72754 /manyplayer | |
parent | 1d983c0175a85d53f4b3a51f8ec8d7e92ec30b31 (diff) |
mkdir a directory if it doesn't exist and underscore spaces in THIS_DIR
Diffstat (limited to 'manyplayer')
-rwxr-xr-x | manyplayer | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -8,7 +8,9 @@ if [ "x${MANYPLAYER_BASE_DIR}" == "x" ] ; then MANYPLAYER_BASE_DIR=~/.manyplayer fi -THIS_DIR=${PWD//\//_} +THIS_DIR=${PWD} +THIS_DIR=${THIS_DIR//\//_} +THIS_DIR=${THIS_DIR// /_} MANYPLAYER_DIR=${MANYPLAYER_BASE_DIR}/${THIS_DIR} exe=$(basename $0) @@ -58,6 +60,8 @@ function tell_last_file { } function setup { + [ -d ${MANYPLAYER_DIR} ] || mkdir ${MANYPLAYER_DIR} + local guess=$(echo *$1*) local name=${guess/$1/!} echo -n $name > ${MANYPLAYER_DIR}/filename |