annotate bin/basicopt @ 623:0f0bdbd8d37d

Update syntax files Additionally nginx repo fixed their cookie thingie.
author nanaya <me@nanaya.pro>
date Mon, 04 Mar 2019 20:01:03 +0900
parents 7f5234a312f7
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
124
5bafb912837e Massive addition of old scripts collection.
Edho Prima Arief <edho@myconan.net>
parents:
diff changeset
1 #!/bin/sh
5bafb912837e Massive addition of old scripts collection.
Edho Prima Arief <edho@myconan.net>
parents:
diff changeset
2 get_filename() {
609
7f5234a312f7 Cleanup style
nanaya <me@nanaya.pro>
parents: 124
diff changeset
3 printf '%s\n' "$*" | sed -e 's/^\(.*\)\.[^.]*$/\1/'
124
5bafb912837e Massive addition of old scripts collection.
Edho Prima Arief <edho@myconan.net>
parents:
diff changeset
4 }
5bafb912837e Massive addition of old scripts collection.
Edho Prima Arief <edho@myconan.net>
parents:
diff changeset
5 get_extension() {
609
7f5234a312f7 Cleanup style
nanaya <me@nanaya.pro>
parents: 124
diff changeset
6 if [ -n "$(printf '%s\n' "$*" | sed -e 's/^[^.]*//')" ]; then
7f5234a312f7 Cleanup style
nanaya <me@nanaya.pro>
parents: 124
diff changeset
7 printf '%s\n' "$*" | sed -e 's/^.*\(\.[^.]*$\)/\1/'
124
5bafb912837e Massive addition of old scripts collection.
Edho Prima Arief <edho@myconan.net>
parents:
diff changeset
8 else
609
7f5234a312f7 Cleanup style
nanaya <me@nanaya.pro>
parents: 124
diff changeset
9 printf '%s\n' ""
124
5bafb912837e Massive addition of old scripts collection.
Edho Prima Arief <edho@myconan.net>
parents:
diff changeset
10 fi
5bafb912837e Massive addition of old scripts collection.
Edho Prima Arief <edho@myconan.net>
parents:
diff changeset
11 }