File: webui-dependencies

package info (click to toggle)
rspamd 3.14.3-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 35,064 kB
  • sloc: ansic: 247,728; cpp: 107,741; javascript: 31,385; perl: 3,089; asm: 2,512; pascal: 1,625; python: 1,510; sh: 589; sql: 313; makefile: 195; xml: 74
file content (41 lines) | stat: -rwxr-xr-x 1,175 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/bin/sh

# NOTE: should be synced with debian/rspamd.triggers

set -eu

test_file()
{
	FILE=$1
	if [ ! -f "$FILE" ]; then
		echo "File '$FILE' not found!"
		exit 1
	fi
	echo "File '$FILE' found."

	REALPATH=$(realpath -e "$FILE") || true
	if [ "$REALPATH" != "$FILE" ]; then
		if [ $# -eq 1 ]; then
			echo "Path '$FILE' does not equal its resolved path: '$REALPATH!"
			exit 1;
		fi

		ALTERNATIVE_FILE=$2
		if [ "$REALPATH" != "$ALTERNATIVE_FILE" ]; then
			echo "Path '$FILE' does neither equal its resolved path nor its alternative path '$ALTERNATIVE_FILE': '$REALPATH!"
			exit 1
		fi
		echo "Path '$FILE' equals its alternative path '$ALTERNATIVE_FILE'."
	else
		echo "Path '$FILE' equals its resolved path."
	fi
}

echo "Start checking files..."

test_file /usr/share/javascript/bootstrap5/js/bootstrap.bundle.min.js /usr/share/bootstrap-html/js/bootstrap.bundle.min.js
test_file /usr/share/javascript/bootstrap5/css/bootstrap.min.css /usr/share/bootstrap-html/css/bootstrap.min.css
test_file /usr/share/javascript/jquery/jquery.min.js /usr/share/nodejs/jquery/dist/jquery.min.js
test_file /usr/share/javascript/requirejs/require.js

echo "Finished checking files."