aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2021-01-20 13:15:43 -0300
committerEuAndreh <eu@euandre.org>2021-01-20 13:15:43 -0300
commit3532dfe1a6c056e4893252d0777e66d93db568f5 (patch)
treed3cfc1358119aed192f38f11fedf598c96ae9490
parentscripts/post.sh: Fix generation of slides (diff)
downloaddotfiles-3532dfe1a6c056e4893252d0777e66d93db568f5.tar.gz
dotfiles-3532dfe1a6c056e4893252d0777e66d93db568f5.tar.xz
scripts/post.sh: Use fully qualified "$OUT" path so it can work from anywhere
-rwxr-xr-xscripts/post.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/scripts/post.sh b/scripts/post.sh
index 14147d40..50cd187f 100755
--- a/scripts/post.sh
+++ b/scripts/post.sh
@@ -67,11 +67,12 @@ slugify() {
print;'
}
+WEBSITE_REPO="$HOME/dev/libre/website"
SLUG_TITLE="$(slugify "$FULL_TITLE")"
PASTE_DATE="$(date -I)"
-OUT="$DIR/$PASTE_DATE-$SLUG_TITLE.$EXT"
+OUT="$WEBSITE_REPO/$DIR/$PASTE_DATE-$SLUG_TITLE.$EXT"
-cd ~/dev/libre/website
+cd "$WEBSITE_REPO"
[ -f "$OUT" ] && {
red "Post named $OUT already exists.\n"