From 5b999637cc11ce3982fca6b345d0897b6c5517be Mon Sep 17 00:00:00 2001 From: Braxton Huggins Date: Thu, 23 Mar 2017 13:50:53 -0600 Subject: [PATCH 1/2] try to install things if the requirements.txt is in utf16 --- lib/python.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/python.sh b/lib/python.sh index a458a15..4b4d1e2 100644 --- a/lib/python.sh +++ b/lib/python.sh @@ -56,23 +56,23 @@ query_dependencies() { deps=() # mssql - if [[ `grep 'pymssql' $(nos_code_dir)/requirements.txt` ]]; then + if [[ `grep 'p\00?y\00?m\00?s\00?s\00?q\00?l' $(nos_code_dir)/requirements.txt` ]]; then deps+=(freetds) fi # mysql - if [[ `grep 'MySQLdb\|mysqlclient' $(nos_code_dir)/requirements.txt` ]]; then + if [[ `grep 'M\00?y\00?S\00?Q\00?L\00?d\00?b\|m\00?y\00?s\00?q\00?l\00?c\00?l\00?i\00?e\00?n\00?t' $(nos_code_dir)/requirements.txt` ]]; then deps+=(mysql-client) fi # memcache - if [[ `grep 'memcache\|libmc' $(nos_code_dir)/requirements.txt` ]]; then + if [[ `grep 'm\00?e\00?m\00?c\00?a\00?c\00?h\00?e\|l\00?i\00?b\00?m\00?c' $(nos_code_dir)/requirements.txt` ]]; then deps+=(libmemcached) fi # postgres - if [[ `grep 'psycopg2' $(nos_code_dir)/requirements.txt` ]]; then + if [[ `grep 'p\00?s\00?y\00?c\00?o\00?p\00?g\00?2' $(nos_code_dir)/requirements.txt` ]]; then deps+=(postgresql94-client) fi # redis - if [[ `grep 'redis' $(nos_code_dir)/requirements.txt` ]]; then + if [[ `grep 'r\00?e\00?d\00?i\00?s' $(nos_code_dir)/requirements.txt` ]]; then deps+=(redis) fi From f3af75610a71f9df5f48f375a4960b6268e2e061 Mon Sep 17 00:00:00 2001 From: Braxton Huggins Date: Thu, 23 Mar 2017 14:09:09 -0600 Subject: [PATCH 2/2] another update to the grep command --- lib/python.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/python.sh b/lib/python.sh index 4b4d1e2..52b6a88 100644 --- a/lib/python.sh +++ b/lib/python.sh @@ -56,23 +56,23 @@ query_dependencies() { deps=() # mssql - if [[ `grep 'p\00?y\00?m\00?s\00?s\00?q\00?l' $(nos_code_dir)/requirements.txt` ]]; then + if [[ `grep -Pa 'p\00?y\00?m\00?s\00?s\00?q\00?l' $(nos_code_dir)/requirements.txt` ]]; then deps+=(freetds) fi # mysql - if [[ `grep 'M\00?y\00?S\00?Q\00?L\00?d\00?b\|m\00?y\00?s\00?q\00?l\00?c\00?l\00?i\00?e\00?n\00?t' $(nos_code_dir)/requirements.txt` ]]; then + if [[ `grep -Pa 'M\00?y\00?S\00?Q\00?L\00?d\00?b\|m\00?y\00?s\00?q\00?l\00?c\00?l\00?i\00?e\00?n\00?t' $(nos_code_dir)/requirements.txt` ]]; then deps+=(mysql-client) fi # memcache - if [[ `grep 'm\00?e\00?m\00?c\00?a\00?c\00?h\00?e\|l\00?i\00?b\00?m\00?c' $(nos_code_dir)/requirements.txt` ]]; then + if [[ `grep -Pa 'm\00?e\00?m\00?c\00?a\00?c\00?h\00?e\|l\00?i\00?b\00?m\00?c' $(nos_code_dir)/requirements.txt` ]]; then deps+=(libmemcached) fi # postgres - if [[ `grep 'p\00?s\00?y\00?c\00?o\00?p\00?g\00?2' $(nos_code_dir)/requirements.txt` ]]; then + if [[ `grep -Pa 'p\00?s\00?y\00?c\00?o\00?p\00?g\00?2' $(nos_code_dir)/requirements.txt` ]]; then deps+=(postgresql94-client) fi # redis - if [[ `grep 'r\00?e\00?d\00?i\00?s' $(nos_code_dir)/requirements.txt` ]]; then + if [[ `grep -Pa 'r\00?e\00?d\00?i\00?s' $(nos_code_dir)/requirements.txt` ]]; then deps+=(redis) fi