tweak more

This commit is contained in:
Mahyar McDonald 2025-11-03 18:06:04 -08:00
parent 016fa9564d
commit e81159c6fb
3 changed files with 9 additions and 3 deletions

View file

@ -18,7 +18,7 @@ jobs:
with:
go-version-file: "go.mod"
- name: Build and test
- name: Build and test go binaries
run: | #shell
go build -v ./...
go test -v ./...

View file

@ -104,10 +104,14 @@ runs:
"$ADD_REPOSITORY" \
"$PACKAGES"
function create_list {
local manifest_file=~/cache-apt-pkgs/manifest_${1}.log
local manifest_file="${HOME}/cache-apt-pkgs/manifest_${1}.log"
if [ -f "${manifest_file}" ]; then
local list=$(cat "${manifest_file}" | tr '\n' ',')
echo ${list:0:-1}
if [ ${#list} -gt 0 ]; then
echo ${list:0:-1}
else
echo ""
fi
else
echo ""
fi

2
lib.sh
View file

@ -224,6 +224,8 @@ function parse_aptfile {
function write_manifest {
if [ ${#2} -eq 0 ]; then
log "Skipped ${1} manifest write. No packages to install."
# Create empty file to ensure outputs are always set
touch "${3}"
else
log "Writing ${1} packages manifest to ${3}..."
# Remove trailing comma if present, delimit by newline and sort.