mirror of
https://github.com/RyanGreenup/cadmus.git
synced 2025-01-17 12:48:35 +01:00
(also fixed double enter bug in generator)
This commit is contained in:
parent
bfaba116a0
commit
2b6dae25c6
@ -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}"
|
||||
|
@ -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!"
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user