-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathshellcheck.sh
More file actions
executable file
·52 lines (48 loc) · 1.08 KB
/
shellcheck.sh
File metadata and controls
executable file
·52 lines (48 loc) · 1.08 KB
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#!/bin/sh
# Bluesky in the shell
# A Bluesky CLI (Command Line Interface) implementation in shell script
# Author Bluesky:@bills-appworks.blue
#
# Copyright (c) 2024 bills-appworks
# This software is released under the MIT License.
# http://opensource.org/licenses/mit-license.php
# recommend to use at pre-commit
targets='
shellcheck.sh
install.sh
download-install.sh
bin/bsky
lib/bsky_core.sh
lib/util.sh
lib/api/*
'
through_params=''
while [ $# -gt 0 ]
do
case $1 in
--bskyshcli-skip-api)
targets=`echo "${targets}" | sed 's_lib/api/\*__g'`
;;
*)
through_params="${through_params} $1"
;;
esac
shift
done
# no double quote for use word splitting
# shellcheck disable=SC2086
set -- $through_params
status_max=0
for target in $targets
do
echo "shellcheck >>>> ${target}"
# if checking SC1090:source to Run Commands file, set source-path to home directory
## shellcheck --source-path="${HOME}" "$@" "${target}"
shellcheck "$@" "${target}"
status=$?
if [ $status -gt $status_max ]
then
status_max=$status
fi
done
exit $status_max