From 7759d3bf93ebc47a9fcd599a5250b9f7e3701c28 Mon Sep 17 00:00:00 2001 From: Ian Kelling Date: Tue, 21 Nov 2023 21:08:16 -0500 Subject: [PATCH] fix: use updated --PROFILE --- pdt.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/pdt.sh b/pdt.sh index 8c053c0..ae67a2d 100644 --- a/pdt.sh +++ b/pdt.sh @@ -20,7 +20,6 @@ PATH="$HOME/.local/bin:$PATH" - _pdtsh_file="$(readlink -f -- "${BASH_SOURCE[0]}")" _pdtsh_dir="${_pdtsh_file%/*}" _pdtsh_tweet="$_pdtsh_dir/t.py" @@ -157,7 +156,9 @@ toot() { # # -a ALT_TEXT Alt-text of IMAGE_FILE. # -# POST can have have some special markup for twitter to deal with the 280 character limit: +# Without POST, you will be prompted for it. POST can have have some +# special markup for twitter so you can have longer than 280 char posts +# to mastodon, then split them or truncate them for twitter. # # * /tnt/ short for "twitter next tweet". /tnt/ will be removed, and the # tweet will be split into 2 at that point. @@ -283,7 +284,7 @@ pdt() { fi fails=() if $do_twitter; then - if ! tweet -$twitter_account "${*%/teof/*}"; then + if ! tweet --$twitter_account "${*%/teof/*}"; then fails+=(tweet) fi fi @@ -296,7 +297,7 @@ pdt() { if $do_mastodon; then - if ! toot -$mastodon_account post "$*" "${toot_args[@]}"; then + if ! toot --$mastodon_account post "$*" "${toot_args[@]}"; then fails+=(toot) fi fi @@ -481,7 +482,7 @@ pdt-setup() { mkdir -p ~/src for repo in errhandle video-tweet; do if [[ -e ~/src/$repo/.git ]]; then - if git -C ~/src/$repo remote -v | grep -E "^origin[[:space:]]+git@vcs.fsf.org:$repo.git" &>/dev/null; then + if git -C ~/src/$repo remote -v | grep -E "^origin[[:space:]]+[^[:space:]]*vcs.fsf.org[^[:space:]]+$repo.git" &>/dev/null; then git -C ~/src/$repo fetch git -C ~/src/$repo reset --hard origin/master git -C ~/src/$repo clean -xfffd -- 2.25.1