Update installation to consider symlinks as well.
Addresses problem raised in #25
This commit is contained in:
parent
c58b29a1aa
commit
a85a2de3b3
3 changed files with 13 additions and 14 deletions
|
@ -57,6 +57,7 @@ runs:
|
||||||
/ \
|
/ \
|
||||||
"${{ steps.load-cache.outputs.cache-hit }}" \
|
"${{ steps.load-cache.outputs.cache-hit }}" \
|
||||||
${{ inputs.packages }}
|
${{ inputs.packages }}
|
||||||
echo "::set-output name=package-version-list::$(cat ~/cache-apt-pkgs/manifest_main.log)"
|
function create_list { local list=$(cat ~/cache-apt-pkgs/manifest_${1}.log | tr '\n' ','); echo ${list:0:-1}; };
|
||||||
echo "::set-output name=all-package-version-list::$(cat ~/cache-apt-pkgs/manifest_all.log)"
|
echo "::set-output name=package-version-list::$(create_list main)"
|
||||||
|
echo "::set-output name=all-package-version-list::$(create_list all)"
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
|
@ -75,14 +75,5 @@ for package in ${normalized_packages}; do
|
||||||
done
|
done
|
||||||
log "done."
|
log "done."
|
||||||
|
|
||||||
manifest_all_filepath="${cache_dir}/manifest_all.log"
|
write_manifest "all" "${manifest_all}" "${cache_dir}/manifest_all.log"
|
||||||
log "Writing all packages manifest to ${manifest_all_filepath}..."
|
write_manifest "main" "${manifest_main}" "${cache_dir}/manifest_main.log"
|
||||||
# Remove trailing comma and write to manifest_all file.
|
|
||||||
echo "${manifest_all:0:-1}" > "${manifest_all_filepath}"
|
|
||||||
log "done."
|
|
||||||
|
|
||||||
manifest_main_filepath="${cache_dir}/manifest_main.log"
|
|
||||||
log "Writing main requested packages manifest to ${manifest_main_filepath}..."
|
|
||||||
# Remove trailing comma and write to manifest_main file.
|
|
||||||
echo "${manifest_main:0:-1}" > "${manifest_main_filepath}"
|
|
||||||
log "done."
|
|
||||||
|
|
7
lib.sh
7
lib.sh
|
@ -28,3 +28,10 @@ function get_package_name_ver {
|
||||||
}
|
}
|
||||||
|
|
||||||
function log { echo "$(date +%H:%M:%S)" "${@}"; }
|
function log { echo "$(date +%H:%M:%S)" "${@}"; }
|
||||||
|
|
||||||
|
function write_manifest {
|
||||||
|
log "Writing ${1} packages manifest to ${3}..."
|
||||||
|
# 0:-1 to remove trailing comma, delimit by newline and sort
|
||||||
|
echo "${2:0:-1}" | tr ',' '\n' | sort > ${3}
|
||||||
|
log "done."
|
||||||
|
}
|
Loading…
Reference in a new issue