diff --git a/.github/workflows/install_tsl.sh b/.github/workflows/install_tsl.sh index a389637..f3ed264 100755 --- a/.github/workflows/install_tsl.sh +++ b/.github/workflows/install_tsl.sh @@ -9,9 +9,15 @@ WORK_DIR=$(pwd) curl -L "https://github.com/db-tu-dresden/TSL/releases/latest/download/tsl.tar.gz" -o ${TMP_DIR}/tsl.tar.gz -LSCPU_FLAGS_STRING=$(LANG=en;lscpu | grep 'Flags:' | sed -E 's/Flags:\s*//g' | sed -E 's/\s/:/g') +curl -L "https://github.com/db-tu-dresden/TSL/releases/latest/download/detect_flags.sh" -o ${TMP_DIR}/detect_flags.sh +chmod +x ${TMP_DIR}/detect_flags.sh + #create array from flags string -AVAIL_FLAGS=(${LSCPU_FLAGS_STRING//:/ }) +# AVAIL_FLAGS=($(${TMP_DIR}/detect_flags.sh)) +IFS=' ' read -r -a AVAIL_FLAGS <<< "$(${TMP_DIR}/detect_flags.sh)" +unset IFS + + #unpack tsl.conf tar -xf ${TMP_DIR}/tsl.tar.gz -C ${TMP_DIR} ${TAR_PREFIX_TSL_DIR}/tsl.conf diff --git a/.github/workflows/release-tsl.yml b/.github/workflows/release-tsl.yml index 75c8eb0..b5128c3 100644 --- a/.github/workflows/release-tsl.yml +++ b/.github/workflows/release-tsl.yml @@ -158,6 +158,7 @@ jobs: files: | ${{ github.workspace }}/tsl.tar.gz ${{ github.workspace }}/.github/workflows/install_tsl.sh + ${{ github.workspace }}/detect_flags.sh ${{ github.workspace }}/${{ steps.rpm.outputs.out }}/${{ steps.rpm.outputs.name}} ${{ github.workspace }}/${{ steps.deb.outputs.out }}/${{ steps.deb.outputs.name}} tag_name: ${{ inputs.tag-name }} diff --git a/detect_flags.sh b/detect_flags.sh index fc27a60..fabcdb7 100755 --- a/detect_flags.sh +++ b/detect_flags.sh @@ -29,7 +29,7 @@ function parse_flags { fi } -lscpu_exe=$(which lscpu) +lscpu_exe=$(which lscpu 2>/dev/null) if [[ ! -z ${lscpu_exe} && -f $lscpu_exe && -x $lscpu_exe ]]; then flags=$(eval LANG=en;lscpu|grep -i flags | tr ' ' '\n' | grep -v -E '^Flags:|^$' | sort -d | tr '\n' ' ') echo "$flags"