File: bootstrap.sh

package info (click to toggle)
ruby-train 3.13.4-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,208 kB
  • sloc: ruby: 10,002; sh: 17; makefile: 8
file content (25 lines) | stat: -rw-r--r-- 544 bytes parent folder | download | duplicates (3)
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
#!/bin/sh

tmpdir=${TMPDIR:-/tmp}

test ! -e $tmpdir/folder && \
  mkdir $tmpdir/folder
chmod 0567 $tmpdir/folder

echo -n 'hello world' > $tmpdir/file
test ! -e $tmpdir/symlink && \
  ln -s $tmpdir/file /tmp/symlink
chmod 0777 $tmpdir/symlink
chmod 0765 $tmpdir/file

echo -n 'hello suid/sgid/sticky' > $tmpdir/sfile
chmod 7765 $tmpdir/sfile

echo -n 'hello space' > $tmpdir/spaced\ file

test ! -e $tmpdir/pipe && \
  mkfifo $tmpdir/pipe

test ! -e $tmpdir/block_device && \
  mknod $tmpdir/block_device b 7 7
chmod 0666 $tmpdir/block_device