Skip to content

Commit 7cbdd00

Browse files
committed
installed packages info added
1 parent 8209166 commit 7cbdd00

File tree

2 files changed

+53
-2
lines changed

2 files changed

+53
-2
lines changed

.github/workflows/make.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
runs-on: ubuntu-24.04
3737
steps:
3838
- uses: actions/checkout@v4
39-
- run: sudo make install
39+
- run: sudo make install FORCE_INSTALL=true
4040
- run: make env lint test
4141
make-macos:
4242
runs-on: macos-14
@@ -52,5 +52,5 @@ jobs:
5252
run: brew install make bash
5353
- name: 'Add make to PATH'
5454
run: echo "/opt/homebrew/opt/make/libexec/gnubin" >> "$GITHUB_PATH"
55-
- run: sudo make install
55+
- run: sudo make install FORCE_INSTALL=true
5656
- run: make env lint test

steps/install.sh

+51
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,57 @@
2121
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2222
# SOFTWARE.
2323

24+
25+
LINUX_ONLY_PACKAGES=(
26+
"coreutils"
27+
"xpdf"
28+
"libxml2-utils"
29+
)
30+
31+
MACOS_ONLY_PACKAGES=(
32+
"gnu-sed"
33+
"wget"
34+
"poppler"
35+
"libxml2"
36+
)
37+
38+
PACKAGES_BOTH=(
39+
"pmd"
40+
"jpeek"
41+
"texlive"
42+
"coreutils"
43+
"parallel"
44+
"bc"
45+
"cloc"
46+
"jq"
47+
"shellcheck"
48+
"aspell"
49+
"xmlstarlet"
50+
"gawk"
51+
"inkscape"
52+
)
53+
54+
if [[ -z "$FORCE_INSTALL" ]]; then
55+
echo "The following packages will be installed:"
56+
57+
if "${LOCAL}/help/is-linux.sh"; then
58+
PACKAGES=("${LINUX_ONLY_PACKAGES[@]}" "${PACKAGES_BOTH[@]}")
59+
else
60+
PACKAGES=("${MACOS_ONLY_PACKAGES[@]}" "${PACKAGES_BOTH[@]}")
61+
fi
62+
63+
for i in "${PACKAGES[@]}"; do
64+
echo " - ${i}"
65+
done
66+
67+
read -p "Do you want to proceed with the installation? (y/n): " -n 1 -r
68+
echo
69+
if [[ ! $REPLY =~ ^[Yy]$ ]]; then
70+
echo "Installation aborted by user."
71+
exit 1
72+
fi
73+
fi
74+
2475
set -e
2576
set -o pipefail
2677

0 commit comments

Comments
 (0)