diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-14 13:42:30 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-14 13:42:30 +0000 |
commit | 75808db17caf8b960b351e3408e74142f4c85aac (patch) | |
tree | 7989e9c09a4240248bf4658a22208a0a52d991c4 /t/recipes/checks/cruft/cruft-minified-js/build-spec/pre-build | |
parent | Initial commit. (diff) | |
download | lintian-75808db17caf8b960b351e3408e74142f4c85aac.tar.xz lintian-75808db17caf8b960b351e3408e74142f4c85aac.zip |
Adding upstream version 2.117.0.upstream/2.117.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 't/recipes/checks/cruft/cruft-minified-js/build-spec/pre-build')
-rwxr-xr-x | t/recipes/checks/cruft/cruft-minified-js/build-spec/pre-build | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/t/recipes/checks/cruft/cruft-minified-js/build-spec/pre-build b/t/recipes/checks/cruft/cruft-minified-js/build-spec/pre-build new file mode 100755 index 0000000..13f30ca --- /dev/null +++ b/t/recipes/checks/cruft/cruft-minified-js/build-spec/pre-build @@ -0,0 +1,52 @@ +#!/bin/sh +# +# Create all the various junk that shouldn't exist in the diff so that we can +# trigger all the tags. + +set -e +dir="$1" +jsdir="$1/usr/share/javascript/" +srcdir="$1" +json="$srcdir/debian/missing-sources/json.js" +uglyjson="$jsdir/json/json.min.js" + +mkdir -p "$jsdir" +mkdir -p "$jsdir/minwithoutsource" +mkdir -p "$jsdir/jswithoutminext" +mkdir -p "$jsdir/json" +mkdir -p "$jsdir/sourced" +mkdir -p "$jsdir/sourced_variant" +mkdir -p "$jsdir/jswithoutminextwithoutsource/" +mkdir -p "$srcdir/src/js" +mkdir -p "$srcdir/build/js" + +# create a js file +uglifyjs -o "$uglyjson" "$json" +# fake install of minified js without min.js +cp "$uglyjson" "$jsdir/jswithoutminext/json.js" +# fake not sourced +cp "$uglyjson" "$jsdir/minwithoutsource/notsourced.min.js" +cp "$uglyjson" "$jsdir/minwithoutsource/subdir.min.js" +# fake install but not sourced +cp "$uglyjson" "$jsdir/jswithoutminextwithoutsource/jsonnotsourced.js" +# fake source and min alone +cp "$uglyjson" "$jsdir/sourced/sourced.min.js" +cp "$json" "$jsdir/sourced/sourced.js" +cp "$uglyjson" "$jsdir/sourced_variant/sourced.min.js" +cp "$json" "$jsdir/sourced_variant/sourced_orig.js" +# sourced in parent's parent +cp "$uglyjson" "$srcdir/build/js/foo.min.js" +cp "$json" "$srcdir/src/js/foo.js" + +cat > $srcdir/src/js/foo.html <<EOF +<html> +<head> +<script> +// Copyright someone +EOF +cat "$uglyjson" >> $srcdir/src/js/foo.html +cat >> $srcdir/src/js/foo.html <<EOF +</script> +</head> +</html> +EOF |