feat(lib-cachereminder): make code more readable

This commit is contained in:
purple 2023-11-20 23:48:20 +01:00 committed by GitHub
parent 026c7947a0
commit b48b083a64
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -3,11 +3,11 @@
updateCacheReminder() {
cd $BLUEPRINT__FOLDER
# Overwrite previous adminCacheReminderHider with the default one.
oldClassName=$(cat .blueprint/extensions/blueprint/private/db/randomclassname);
newClassName=$RANDOM;
mv .blueprint/extensions/blueprint/assets/misc/cacheOverlay-$oldClassName.css .blueprint/extensions/blueprint/assets/misc/cacheOverlay-$newClassName.css;
sed -i "s~cacheOverlay-$oldClassName~cacheOverlay-$newClassName~g" .blueprint/extensions/blueprint/assets/blueprint.style.css;
sed -i "s~cacheOverlay-$oldClassName~cacheOverlay-$newClassName~g" resources/views/layouts/admin.blade.php;
sed -i "s~cacheOverlay-$oldClassName~cacheOverlay-$newClassName~g" .blueprint/extensions/blueprint/assets/misc/cacheOverlay-$newClassName.css;
echo "$newClassName" > .blueprint/extensions/blueprint/private/db/randomclassname;
oldClassName=$(cat .blueprint/extensions/blueprint/private/db/randomclassname)
newClassName=$RANDOM
mv .blueprint/extensions/blueprint/assets/misc/cacheOverlay-$oldClassName.css .blueprint/extensions/blueprint/assets/misc/cacheOverlay-$newClassName.css
sed -i "s~cacheOverlay-$oldClassName~cacheOverlay-$newClassName~g" .blueprint/extensions/blueprint/assets/blueprint.style.css
sed -i "s~cacheOverlay-$oldClassName~cacheOverlay-$newClassName~g" resources/views/layouts/admin.blade.php
sed -i "s~cacheOverlay-$oldClassName~cacheOverlay-$newClassName~g" .blueprint/extensions/blueprint/assets/misc/cacheOverlay-$newClassName.css
echo "$newClassName" > .blueprint/extensions/blueprint/private/db/randomclassname
}