forked from team/bashblog
move to blog dir a proper if block instead of && chain
This commit is contained in:
parent
d0e7d60d93
commit
554ad1615b
10
bb.sh
10
bb.sh
@ -891,7 +891,7 @@ make_gophermap() {
|
||||
EOF
|
||||
chmod +x "${HOME}/public_html/blog/${gophermap}"
|
||||
fi
|
||||
chmod 644 ./*.md
|
||||
chmod 644 "./*.md"
|
||||
}
|
||||
|
||||
make_gemini() {
|
||||
@ -1111,9 +1111,11 @@ date_version_detect() {
|
||||
# $2 file name of a draft to continue editing (optional)
|
||||
do_main() {
|
||||
# make sure we're in the right directory
|
||||
[ "$(pwd)" != "$HOME/public_html/blog" ] &&
|
||||
echo "you're not in your blog directory. moving you there now" && \
|
||||
mkdir -p "$HOME/public_html/blog" && cd "$HOME/public_html/blog" || exit 1
|
||||
if [ "$(pwd)" != "$HOME/public_html/blog" ]; then
|
||||
echo "you're not in your blog directory. moving you there now"
|
||||
mkdir -p "$HOME/public_html/blog"
|
||||
cd "$HOME/public_html/blog" || exit 1
|
||||
fi
|
||||
|
||||
# Detect if using BSD date or GNU date
|
||||
date_version_detect
|
||||
|
Loading…
Reference in New Issue
Block a user