File tree Expand file tree Collapse file tree 1 file changed +13
-7
lines changed Expand file tree Collapse file tree 1 file changed +13
-7
lines changed Original file line number Diff line number Diff line change @@ -81,6 +81,16 @@ function detect_os()
81
81
echo ${platform}
82
82
}
83
83
84
+ function install_brew()
85
+ {
86
+ TRUE_CMD=` which true`
87
+ brew=` type -P brew || ${TRUE_CMD} `
88
+ if [ -z " ${brew} " ]; then
89
+ echo " brew not found !"
90
+ /bin/bash -c " $( curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh) "
91
+ fi
92
+ }
93
+
84
94
function install_xidel()
85
95
{
86
96
echo " Install xidel ..."
@@ -120,13 +130,9 @@ function install_xidel()
120
130
# install the xidel on MacOS platform
121
131
# refer to: https://www.evernote.com/shard/s69/sh/ff1e78f3-a369-4855-b18f-6184ce789c45/f3511927d0fb356ce883835f2eb712e0
122
132
if [[ " $platform " == " macos" ]]; then
123
- echo " Downloading xidel......"
124
- xidel_zip=xidel.zip
125
- if [ ! -f ${xidel_zip} ]; then
126
- curl -L https://www.evernote.com/shard/s69/sh/ff1e78f3-a369-4855-b18f-6184ce789c45/f3511927d0fb356ce883835f2eb712e0/res/de33e89a-cdc6-42b5-a476-32e2df1cf4bc/${xidel_zip} -o ${xidel_zip}
127
- fi
128
- unzip ${xidel_zip}
129
- mv xidel /usr/local/bin/
133
+ install_brew
134
+ echo " brew install xidel..."
135
+ brew install xidel
130
136
fi
131
137
132
138
cd ..
You can’t perform that action at this time.
0 commit comments