addition for concat example
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
# cache busting and concatenation example
|
||||
function magic() {
|
||||
FN="$1.$2"
|
||||
MD5="$1_$(md5sum "$FN" | cut -f1 -d' ').$2"
|
||||
@@ -21,3 +22,8 @@ done
|
||||
sed -i -e 's$.*JS_ANCHOR.*$\0\n<link rel="stylesheet" href="all.css" type="text/css" />$' index.html
|
||||
magic all js
|
||||
|
||||
|
||||
DB_VERSION=$(date +%s)
|
||||
# or better
|
||||
DB_VERSION=$(git rev-parse --short HEAD)
|
||||
sed -i -e "s/let databaseFolder = .*;/let databaseFolder = \"db-$DB_VERSION\";/" index.html
|
||||
|
||||
@@ -103,7 +103,7 @@ else
|
||||
echo "Unable to download files, exiting! (Maybe try again?)"
|
||||
exit 1
|
||||
fi
|
||||
TAR_VERSION="$(git rev-parse --short HEAD)_$DB_VERSION"
|
||||
TAR_VERSION="$(git rev-parse --short HEAD)"
|
||||
fi
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user