first commit
This commit is contained in:
commit
81099ce7a4
5 changed files with 95 additions and 0 deletions
13
next
Executable file
13
next
Executable file
|
|
@ -0,0 +1,13 @@
|
|||
#!/bin/bash
|
||||
set -e
|
||||
OldDir="$(pwd)"
|
||||
cd "$(dirname "$0")"
|
||||
if ! [ -e bookmark.txt ]; then
|
||||
echo "Please run $(dirname "$0")/init first to initialise the book"
|
||||
exit 1; fi
|
||||
N=$[ "$(cat bookmark.txt)" + 1 ]
|
||||
if [ "$(cat bookmark.txt)" -gt "$(wc -l < one-section-per-line.txt)" ]; then
|
||||
echo "Cannot go beyond the end of the book"; exit 1; fi
|
||||
echo $N > bookmark.txt
|
||||
cd "$OldDir"
|
||||
$(dirname "$0")/read
|
||||
Loading…
Add table
Add a link
Reference in a new issue