1
0
mirror of https://github.com/RyanGreenup/cadmus.git synced 2025-01-17 12:48:35 +01:00

Moved Config File to ~/.config/cadmus/config.json #11 #2

(also fixed double enter bug in generator)
This commit is contained in:
ryangreenup 2020-07-24 01:47:39 +10:00
parent bfaba116a0
commit 2b6dae25c6
2 changed files with 2 additions and 2 deletions

View File

@ -3,7 +3,7 @@
readonly script_name=$(basename "${0}")
script_dir=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
readonly script_dir=$(realpath "${script_dir}""/""${script_name}" | xargs dirname)
readonly CONFIG=$(realpath "${script_dir}/../config.json") # one directory above
readonly CONFIG="$HOME/.config/cadmus/config.json" # one directory above
## readonly SERVER_DIR="/srv/www/html/MD"
## readonly RECOLL_CONFIG_DIR="$HOME/.cadmus"
## readonly MKDOCS_YML="$HOME/Notes/mkdocs.yml" ## This may be above the notes directory, the
@ -127,6 +127,7 @@ checkConfig () {
if [[ "${choice}" == "y" ]]; then
config_json=$("${script_dir}/makeConfig.bash")
if [[ "${config_json}" != "" ]]; then
[[ -d "$(dirname "${CONFIG}")" ]] || mkdir -p "$(dirname "${CONFIG}")"
echo "${config_json}" > "${CONFIG}"
echo -e "This is the Config:\n"
highlight "${CONFIG}"

View File

@ -96,7 +96,6 @@ AskValues () {
echoerr "\t (This directory should contain index.md or home.md)"
read -e NOTES_DIR
NOTES_DIR="$(echo "${NOTES_DIR/\~/$HOME}")"
read -d '' -s -n1 choice
# NOTES_DIR="$(cd /; sk --height 40% -i -c 'fd {}' )"
[[ -d "${NOTES_DIR}" ]] || echoerr -e "\n \e[3m\e[1m \e[1;31m ⚠ WARNING: \e[0m No Such Directory!"