diff options
author | Aleksander Machniak <alec@alec.pl> | 2017-01-20 15:30:01 +0300 |
---|---|---|
committer | Aleksander Machniak <alec@alec.pl> | 2017-01-20 15:30:01 +0300 |
commit | 15d0c55b20ba780033cff3166a5d686bb7255ade (patch) | |
tree | 084d15432d69b82bb13c7918168ae309984c31e8 /bin | |
parent | 73d53051cd1d8df672a4cd82482d6468f82a208e (diff) |
Throw error if one of required programs is not installed (#5598)
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/install-jsdeps.sh | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/bin/install-jsdeps.sh b/bin/install-jsdeps.sh index 35bf5915b..c39f5bb8a 100755 --- a/bin/install-jsdeps.sh +++ b/bin/install-jsdeps.sh @@ -34,6 +34,16 @@ $WGET = trim(`which wget`); $UNZIP = trim(`which unzip`); $FILEINFO = trim(`which file`); +if (empty($UNZIP)) { + die("ERROR: Required program 'unzip' not found\n"); +} +if (empty($FILEINFO)) { + die("ERROR: Required program 'file' not found\n"); +} +if (empty($CURL) && empty($WGET)) { + die("ERROR: Required program 'wget' or 'curl' not found\n"); +} + $CACHEDIR = sys_get_temp_dir(); if (is_writeable(INSTALL_PATH . 'temp/js_cache') || mkdir(INSTALL_PATH . 'temp/js_cache', 0774, true)) { |