summaryrefslogtreecommitdiff
path: root/sys/orgdenv
blob: 9c537eb426e8d9e9c501282f29a245020eb6c559 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/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