This commit is contained in:
BoHung Chiu 2022-08-24 15:39:33 +08:00
parent e06e35666e
commit 3b835dc1bd
1 changed files with 9 additions and 3 deletions

View File

@ -84,6 +84,10 @@ else
fi
# build ImageMagick and install
if [ -z $(which convert) ]; then
remove_1_dir="0"
if [[ ! -d "1" ]]; then
remove_1_dir="1";
fi
tmp_pwd="$(pwd)"
sudo bash -l -c "cd /root && \
apt-get install libjpeg62 -y && \
@ -97,9 +101,8 @@ if [ -z $(which convert) ]; then
apt install -y libgif-dev libjpeg-dev libopenexr-dev libpng-dev libwebp-dev && \
apt install -y cmake pkg-config libbrotli-dev && \
wget -nc https://imagemagick.org/archive/ImageMagick.tar.gz && \
tar xvfz ImageMagick.tar.gz && \
cd $(ls -d /root/libpng-1.5.13/ImageMagick-7*) && \
chown $USER:$USER . -R && \
tar xfz ImageMagick.tar.gz && \
cd $(sudo bash -l -c 'ls -d /root/libpng-1.5.13/ImageMagick-7*') && \
./configure --with-bzlib=yes --with-fontconfig=yes --with-freetype=yes --with-gslib=yes --with-gvc=yes --with-jpeg=yes --with-jp2=yes --with-png=yes --with-tiff=yes --disable-shared --with-modules && \
make && make install && \
ln -s /usr/local/lib/* /usr/lib/. && \
@ -107,6 +110,9 @@ if [ -z $(which convert) ]; then
ln -s /usr/local/bin/* /usr/bin/. && \
convert -list configure"
cd $tmp_pwd
if [[ "$remove_1_dir" == "1" ]]; then
rm -rf 1/
fi
fi
## install rvm
if [ -z $(which rvm) ]; then