-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The bin directory exists as a target for build operations. Its contents are various SO-related scripts that have semi-general use. The source code for scripts is in the src/scripts directory.
- Loading branch information
Jonathan Leffler
committed
Feb 13, 2017
1 parent
34b2031
commit 3b9e4db
Showing
11 changed files
with
116 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Ignore everything... | ||
* | ||
# Except the README.md and .gitignore files | ||
!README.md | ||
!.gitignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# `bin` Directory | ||
|
||
Apart from the README.md file (and .gitignore file), this is a | ||
destination directory for binaries (compiled C programs, etc) and for | ||
the 'compiled' versions of shell scripts (or any other scripting | ||
language). | ||
There shouldn't be any source code in here. | ||
|
||
The source code for the scripts is in `src/scripts`; compilation copies | ||
the scripts (without the language-identifying suffix) to this directory. | ||
|
||
The directory content should be ignored except for the README.md file. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
posixcmd | ||
posixfun | ||
posixhdr | ||
so | ||
wso |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
### The `scripts` Directory | ||
|
||
This directory contains the version-controlled source of shell scripts | ||
(and any other scripting language). | ||
The files here have a language-specific suffix. | ||
|
||
The 'compilation' process creates a copy of the script without any | ||
suffix and moves it to the top-level `bin` directory, which can be added | ||
to `$PATH`. | ||
It is recommended that it is added at the end of the PATH, not the | ||
beginning. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Makefile for miscellany directory | ||
|
||
include ../../etc/soq-head.mk | ||
|
||
BINDIR = ../../bin | ||
CPFLAGS = -pf | ||
|
||
PROG01 = posixcmd | ||
PROG02 = posixfun | ||
PROG03 = posixhdr | ||
PROG04 = wso | ||
PROG05 = so | ||
|
||
PROGRAMS = \ | ||
${PROG01} \ | ||
${PROG02} \ | ||
${PROG03} \ | ||
${PROG04} \ | ||
${PROG05} \ | ||
|
||
all: ${PROGRAMS} | ||
|
||
install: all | ||
${CP} ${CPFLAGS} ${PROGRAMS} ${BINDIR} | ||
|
||
include ../../etc/soq-tail.mk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/sh | ||
# | ||
# Echo URLs for POSIX commands | ||
|
||
baseurl="http://pubs.opengroup.org/onlinepubs/9699919799" | ||
bq='`' | ||
|
||
for command in "$@" | ||
do | ||
echo "[$bq$command$bq]($baseurl/utilities/$command.html)" | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/sh | ||
# | ||
# Echo URLs for POSIX functions | ||
|
||
baseurl="http://pubs.opengroup.org/onlinepubs/9699919799" | ||
bq='`' | ||
|
||
for function in "$@" | ||
do | ||
echo "[$bq$function()$bq]($baseurl/functions/$function.html)" | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/sh | ||
# | ||
# Echo URLs for POSIX headers | ||
|
||
baseurl="http://pubs.opengroup.org/onlinepubs/9699919799" | ||
bq='`' | ||
|
||
for header in "$@" | ||
do | ||
mapped="$(echo "$header" | sed 's%/%_%; s/[<>"]//g')" | ||
echo "[$bq<$header>$bq]($baseurl/basedefs/$mapped.html)" | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/sh | ||
# | ||
# Indent by four spaces for Stack Overflow | ||
|
||
exec sed '/./s/^/ /' "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/bin/sh | ||
# | ||
# Print standardized 'Welcome to Stack Overflow' comment with URLs. | ||
|
||
cat <<EOF | ||
Welcome to Stack Overflow. | ||
Please note that the preferred way of saying 'thanks' around here is by | ||
up-voting good questions and helpful answers (once you have enough | ||
reputation to do so), and by accepting the most helpful answer to any | ||
question you ask (which also gives you a small boost to your | ||
reputation). | ||
Please see the [About] page and also [How do I ask questions | ||
here?](http://stackoverflow.com/help/how-to-ask) and | ||
[What do I do when someone answers my | ||
question?](http://stackoverflow.com/help/someone-answers) | ||
EOF |