Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
Acme.Sh
Commits
584cc6de
Unverified
Commit
584cc6de
authored
Jan 11, 2021
by
Mike Beattie
Committed by
GitHub
Jan 11, 2021
Browse files
Avoid usage of sed -e
parent
2e5a6e21
Changes
1
Hide whitespace changes
Inline
Side-by-side
notify/telegram.sh
View file @
584cc6de
...
...
@@ -37,7 +37,7 @@ telegram_send() {
_telegram_bot_url
=
"https://api.telegram.org/bot
${
TELEGRAM_BOT_APITOKEN
}
/sendMessage"
if
_post
"
$_data
"
"
$_telegram_bot_url
"
;
then
# shellcheck disable=SC2154
_message
=
$(
printf
"%s
\n
"
"
$response
"
|
sed
-n
e
's/.*"ok":\([^,]*\).*/\1/p'
)
_message
=
$(
printf
"%s
\n
"
"
$response
"
|
sed
-n
's/.*"ok":\([^,]*\).*/\1/p'
)
if
[
"
$_message
"
=
"true"
]
;
then
_info
"telegram send success."
return
0
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment