#!/bin/sh # Set up the full gamut of ORGD environment variables based on the prompt # path. # Usage: # orgdenv .profile # Add all default orgd paths, e.g. $HOME/docs/wr/orgd into .profile. # orgdenv .zshrc ~/.local/orgd # Add orgd paths starting at ~/.local/orgd into .zshrc. # TODO: finish the envvars off. [ -z "$1" ] && echo "You must provide a file to add into." && exit [ -z "$2" ] && ORGD_ROOT="$HOME/docs/wr/orgd" || ORGD_ROOT="$2" echo "$1" echo "$2" touch "$1" cat > "$1" <<-END export ORGD_ROOT="$ORGD_ROOT" # kt export ORGD_KT_PATH="$ORGD_ROOT/kt" export ORGD_BIB_PATH="$ORGD_KT_PATH/biblio" export ORGD_BIBCSV_PATH="$ORGD_KT_PATH/biblio.csv" export ORGD_MED_PATH="$ORGD_ROOT/med" END