]> Sergey Matveev's repositories - nnn.git/commitdiff
Create test files and directories
authorlostd <lostd@2f30.org>
Wed, 22 Oct 2014 21:12:57 +0000 (00:12 +0300)
committerlostd <lostd@2f30.org>
Wed, 22 Oct 2014 21:12:57 +0000 (00:12 +0300)
mktest.sh [new file with mode: 0644]

diff --git a/mktest.sh b/mktest.sh
new file mode 100644 (file)
index 0000000..8ab7be5
--- /dev/null
+++ b/mktest.sh
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+# Create test files and directories
+
+test -e test && {
+    echo "Remove test and try again"
+    exit 1
+}
+
+mkdir test && cd test
+
+echo 'It works!' > normal.txt
+ln -s normal.txt ln-normal.txt
+ln -s normal.txt ln-normal
+mkdir normal-dir
+ln -s normal-dir ln-normal-dir
+ln -s nowhere ln-nowhere
+mkfifo mk-fifo
+touch no-access && chmod 000 no-access
+ln -s ../normal.txt normal-dir/ln-normal.txt
+ln -s ../normal.txt normal-dir/ln-normal