Properly name the fontawesome script

This commit is contained in:
Tom 2023-07-04 13:27:29 +02:00
parent 430a3d7286
commit e207496229
2 changed files with 12 additions and 6 deletions

View file

@ -4,6 +4,7 @@ set -e
# make a temporary directory and cd into it # make a temporary directory and cd into it
TEMPDIR=$(mktemp -d) TEMPDIR=$(mktemp -d)
pushd "$TEMPDIR" pushd "$TEMPDIR"
trap 'popd && rm -rf $TEMPDIR' EXIT
# curl the colorbox zip and unpack it # curl the colorbox zip and unpack it
curl -L https://github.com/jackmoore/colorbox/archive/master.zip --output master.zip curl -L https://github.com/jackmoore/colorbox/archive/master.zip --output master.zip
@ -17,6 +18,3 @@ rm -rf /var/www/data/project/web/sites/default/libraries/colorbox
# copy over the new installation # copy over the new installation
mv colorbox-master/ /var/www/data/project/web/sites/default/libraries/colorbox mv colorbox-master/ /var/www/data/project/web/sites/default/libraries/colorbox
# cleanup
popd
rm -rf "$TEMPDIR"

View file

@ -1,9 +1,16 @@
#!/bin/bash #!/bin/bash
set -e set -e
FAINFO=`drush pm-list --pipe --type=module --filter=id=fontawesome`
if [[ -z "$FAINFO" ]]; then
echo "Font Awesome is not installed, aborting"
exit 0
fi
# make a temporary directory and cd into it # make a temporary directory and cd into it
TEMPDIR=$(mktemp -d) TEMPDIR=$(mktemp -d)
pushd "$TEMPDIR" pushd "$TEMPDIR"
trap 'popd && rm -rf $TEMPDIR' EXIT
# curl the colorbox zip and unpack it # curl the colorbox zip and unpack it
curl -L https://use.fontawesome.com/releases/v6.4.0/fontawesome-free-6.4.0-web.zip --output fontawesome.zip curl -L https://use.fontawesome.com/releases/v6.4.0/fontawesome-free-6.4.0-web.zip --output fontawesome.zip
@ -17,6 +24,7 @@ rm -rf /var/www/data/project/web/libraries/fontawesome
# Move over the fontawesome zip file # Move over the fontawesome zip file
mv fontawesome-* /var/www/data/project/web/libraries/fontawesome mv fontawesome-* /var/www/data/project/web/libraries/fontawesome
# cleanup # Update drush config to use local fontawesome
popd drush config:set --yes --input-format=yaml fontawesome.settings use_cdn false
rm -rf "$TEMPDIR" drush config:set --yes --input-format=yaml fontawesome.settings use_shim false
drush cr