Skip to content

Commit

Permalink
Installing locate command on gh env
Browse files Browse the repository at this point in the history
  • Loading branch information
iloveitaly committed May 21, 2021
1 parent abfda82 commit 1ec7d3c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 19 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:

steps:
- name: Install packages
run: apt-get update && apt-get install -y autoconf bison build-essential curl gettext git libgd-dev libcurl4-openssl-dev libedit-dev libicu-dev libjpeg-dev libmysqlclient-dev libonig-dev libpng-dev libpq-dev libreadline-dev libsqlite3-dev libssl-dev libxml2-dev libzip-dev openssl pkg-config re2c zlib1g-dev
run: apt-get update && apt-get install -y autoconf bison build-essential curl gettext git libgd-dev libcurl4-openssl-dev libedit-dev libicu-dev libjpeg-dev libmysqlclient-dev libonig-dev libpng-dev libpq-dev libreadline-dev libsqlite3-dev libssl-dev libxml2-dev libzip-dev openssl pkg-config re2c zlib1g-dev mlocate

- name: asdf_plugin_test
uses: asdf-vm/actions/plugin-test@v1
Expand All @@ -49,7 +49,7 @@ jobs:

steps:
- name: Install packages
run: brew install autoconf automake bison bzip2 freetype gd gettext icu4c krb5 libedit libiconv libjpeg libpng libxml2 libzip pkg-config re2c zlib
run: brew install autoconf automake bison bzip2 freetype gd gettext icu4c krb5 libedit libiconv libjpeg libxml2 libzip pkg-config re2c zlib

- name: asdf_plugin_test
uses: asdf-vm/actions/plugin-test@v1
Expand Down
28 changes: 11 additions & 17 deletions bin/install
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,6 @@ install_php() {

local operating_system=$(uname -a)

echo "test2"
echo $(locate libpng)
echo $(locate libjpeg)
exit 1


# many macos packages require modifications to various env variables in order for the build process to pick
# up the correct version of the packages. These checks are done here instead of `construct_configure_options`
# because modifications to $PKG_CONFIG_PATH are not propogated from the subshell to this shell.
Expand All @@ -45,7 +39,11 @@ install_php() {
local libxml2_path=$(homebrew_package_path libxml2)
local openssl_path=$(homebrew_package_path openssl)

echo "busin test"
echo $(brew list --versions bison)
echo $(brew info bison)
if [ -n "$bison_path" ]; then
echo "I have found the bison"
export "PATH=${bison_path}/bin:${PATH}"
else
missing_required_packages="$missing_required_packages bison"
Expand Down Expand Up @@ -341,12 +339,8 @@ os_based_configure_options() {
missing_required_packages="$missing_required_packages libiconv"
fi
else
echo "test"
echo $(locate libpng)
echo $(locate libjpeg)
exit 1
local jpeg_path=$(locate libjpeg | awk '{ print length(), $0 | "sort -n" }' | cut -d" " -f2- | head -n 1)
local libpng_path=$(locate libpng | awk '{ print length(), $0 | "sort -n" }' | cut -d" " -f2- | head -n 1)
local jpeg_path=$(locate libjpeg.so | awk '{ print length(), $0 | "sort -n" }' | cut -d" " -f2- | head -n 1 | xargs dirname)
local libpng_path=$(locate libpng.so | awk '{ print length(), $0 | "sort -n" }' | cut -d" " -f2- | head -n 1 | xargs dirname)
configure_options="--with-openssl --with-curl --with-zlib --with-readline --with-gettext"

if [ "$jpeg_path" = "" ]; then
Expand All @@ -355,11 +349,11 @@ os_based_configure_options() {
configure_options="$configure_options --with-jpeg-dir=$jpeg_path --with-jpeg"
fi

if [ "$libpng_path" = "" ]; then
missing_required_packages="$missing_required_packages libpng"
else
configure_options="$configure_options --with-png-dir=$libpng_path --with-png"
fi
# if [ "$libpng_path" = "" ]; then
# missing_required_packages="$missing_required_packages libpng"
# else
# configure_options="$configure_options --with-png-dir=$libpng_path --with-png"
# fi
fi

if [ -n "$missing_required_packages" ]; then
Expand Down

0 comments on commit 1ec7d3c

Please sign in to comment.