Skip to content

First version using only bash#1

Merged
stertooy merged 6 commits intogap-actions:mainfrom
stertooy:v1-via-bash
Mar 24, 2026
Merged

First version using only bash#1
stertooy merged 6 commits intogap-actions:mainfrom
stertooy:v1-via-bash

Conversation

@stertooy
Copy link
Copy Markdown
Collaborator

@stertooy stertooy commented Mar 20, 2026

I gave up on using PackageManager, so this only uses bash (and GAP).

The idea is to install the packages under $GAPROOT/pkg, and to not
build them here. The building can then be done by the build-pkg action,
which seems appropriate, and I don't think it's a good idea to spread package
building over multiple actions.

For this to work properly on Windows/Cygwin, we do need to install jq and bsdtar - see gap-actions/setup-cygwin#20.

Comment thread action.yml
run: |
sudo apt-get install --no-install-recommends texlive-latex-base texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended
- name: "Run tests"
run: sudo apt install -y libarchive-tools # bsdtar
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So why exactly do we need bsdtar?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good that you asked... made me realise I forgot the --strip-components option when extracting.

bsdtar isn't absolutely necessary, but it makes things a lot easier. If using GNU tar we can't use that to extract .zip archives, so we'd have to use unzip. But that doesn't support --strip-components, so we have to manually move files up one level. And on Windows/Cygwin we have to ensure we're working with Cygwin versions of tar and unzip instead of Windows ones. It's a mess, really.

Comment thread install-pkg-functions.sh
}

# Get archive URL
get_archive_url() {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is turning into a quite complex shell script.

I don't mind, but next time, perhaps think about using e.g. Python instead? It has fewer warts and probably more people can help debug it ;-)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah... in hindsight that would've been better. Really don't have the time (and energy 😪 ) to rewrite it right now, though.

Comment thread README.md Outdated
Copy link
Copy Markdown
Member

@fingolfin fingolfin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems fine to me, merge if you will

@stertooy
Copy link
Copy Markdown
Collaborator Author

Just need to swap the cygwin action back to the gap-actions repo once the latest commit is tagged (on phone so can't do this myself right now), then this one can be merged :)

@stertooy stertooy merged commit a773b8c into gap-actions:main Mar 24, 2026
19 checks passed
@stertooy stertooy deleted the v1-via-bash branch March 24, 2026 21:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants