Skip to content

Commit

Permalink
Fix dependencies setup on Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
shivammathur committed Jun 15, 2024
1 parent 61ec81f commit d0db45a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/scripts/linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ get_dependencies() {
package=$1
prefix=$2
list_deps="$(grep "${package#*-}" "${script_dir:?}"/../lists/linux-deps | cut -d '=' -f 2 | grep -Eo "$prefix.*")"
package_deps="$(sed -e '/Package:\s'"$package$"'/,/^\s*$/!d' /tmp/Packages | grep -Eo "^Depends.*" | tr ',' '\n' | awk -v ORS='' '/^\s'"$prefix"'/{print$0}' | sed -e 's/([^()]*)//g' | sort | uniq | xargs echo -n)"
IFS=$'\n' read -d '' -r -a package_deps < <(sed -n '/Package:\s'"$package"'/,/^$/p' /tmp/Packages | grep '^Depends:' | cut -d ':' -f2- | tr ',' '\n' | grep -E '^\s*'"$prefix" | cut -d '(' -f1 | sed 's/^\s*//;s/\s*$//' | sort -u);
deps=()
[[ -n "${list_deps[*]}" ]] && deps+=("${list_deps[@]}")
[[ -n "${package_deps[*]}" ]] && deps+=("${package_deps[@]}")
Expand Down

0 comments on commit d0db45a

Please sign in to comment.