File: pre_build

package info (click to toggle)
lintian 2.5.50.4
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 18,268 kB
  • ctags: 1,873
  • sloc: perl: 30,993; sh: 6,133; makefile: 3,443; xml: 1,805; ansic: 568; python: 65; cpp: 9; java: 9; tcl: 4
file content (28 lines) | stat: -rwxr-xr-x 765 bytes parent folder | download | duplicates (14)
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
#!/bin/sh
dir="$1/strangename"
mkdir -p "$dir"

# All file names are quoted twice, once for the shell and once for tar
# (-T)

# File named <quote><backslash><space>
echo "foo" > "$dir/'\\ "
# File named <backslash>
echo "bar" > "$dir/\\"
# File named <backslash><backslash>
# - causes md5sums-lists-nonexistent-file
echo "bar" > "$dir/\\\\"

# File named a<backslash><backslash>b
# - causes md5sums-lists-nonexistent-file
echo "bar" > "$dir/a\\\\b"

# Symlink to file named a<backslash><backslash>b
ln -s 'a\\b' "$dir/link-to-weird-file1"

# Because the above is not insane enough...
# If Lintian gets this wrong, it will become an
# "unsafe-symlink".
mkdir -p "$dir/\\.\\./\\.\\."
echo "golf" > "$dir/\\.\\./\\.\\./\\.\\."
ln -s '\.\./\.\./\.\.' "$dir/some-file"