Skip to content
This repository was archived by the owner on Dec 29, 2022. It is now read-only.

Commit e011a9d

Browse files
committed
Prepping for name change
1 parent 21014eb commit e011a9d

10 files changed

+92
-103
lines changed

README.mkd

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
BashUtils is a collection of libraries intended simplify writing bash scripts.
1+
Bashful is a collection of libraries intended simplify writing bash scripts.
22

33
To install, run the 'install' script:
44

@@ -8,24 +8,24 @@ This will install the scripts to DIR or to ~/bin, if not specified.
88

99
To get documentation:
1010

11-
bashutils help [COMMAND]
11+
bashful help [COMMAND]
1212

1313
This will display documentation on COMMAND. If no COMMAND is specified,
1414
general help and a list of all libraries/commands will be given.
1515

1616
To get documentation for a specific library:
1717

18-
bashutils-input help [COMMAND]
18+
bashful-input help [COMMAND]
1919

2020
This works exactly like the previous documentation command except it is
2121
specific to the input library.
2222

2323
To use within a bash script, simply source the needed library:
2424

25-
source bashutils-input
25+
source bashful-input
2626

2727
At this point, all functions in the input library are available to the script.
2828

2929
To test out a command or to use in a non-bash context:
3030

31-
bashutils COMMAND [OPTIONS] [ARGUMENTS]
31+
bashful COMMAND [OPTIONS] [ARGUMENTS]

bashutils-autodoc.sh

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
#!/bin/bash
22

3-
# Filename: bashutils-autodoc.sh
3+
# Filename: bashful-autodoc.sh
44
# Description: Functions for extracting embedded documentation.
55
# Maintainer: Jeremy Cantrell <jmcantrell@gmail.com>
6-
# Last Modified: Wed 2010-02-10 00:19:49 (-0500)
6+
# Last Modified: Wed 2010-02-10 10:21:38 (-0500)
77

8-
# autodoc-begin bashutils-autodoc {{{
8+
# autodoc-begin bashful-autodoc {{{
99
#
1010
# The autodoc library provides a way to extract documentation from scripts.
1111
#
@@ -21,17 +21,17 @@
2121
# #
2222
# # autodoc-end NAME
2323
#
24-
# autodoc-end bashutils-autodoc }}}
24+
# autodoc-end bashful-autodoc }}}
2525

2626
if (( ${BASH_LINENO:-0} == 0 )); then
27-
source bashutils-autodoc
27+
source bashful-autodoc
2828
autodoc_execute "$0" "$@"
2929
exit
3030
fi
3131

32-
[[ $BASHUTILS_AUTODOC_LOADED ]] && return
32+
[[ $BASHFUL_AUTODOC_LOADED ]] && return
3333

34-
source bashutils-utils
34+
source bashful-utils
3535

3636
autodoc() #{{{1
3737
{
@@ -130,4 +130,4 @@ autodoc_commands() #{{{1
130130

131131
#}}}1
132132

133-
BASHUTILS_AUTODOC_LOADED=1
133+
BASHFUL_AUTODOC_LOADED=1

bashutils-files.sh

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
11
#!/bin/bash
22

3-
# Filename: bashutils-files.sh
3+
# Filename: bashful-files.sh
44
# Description: Miscellaneous utility functions for dealing with files.
55
# Maintainer: Jeremy Cantrell <jmcantrell@gmail.com>
6-
# Last Modified: Tue 2010-02-09 22:42:06 (-0500)
6+
# Last Modified: Wed 2010-02-10 10:22:10 (-0500)
77

8-
# autodoc-begin bashutils-files {{{
8+
# autodoc-begin bashful-files {{{
99
#
1010
# The files library provides functions for working with files/directories.
1111
#
12-
# autodoc-end bashutils-files }}}
12+
# autodoc-end bashful-files }}}
1313

1414
if (( ${BASH_LINENO:-0} == 0 )); then
15-
source bashutils-autodoc
15+
source bashful-autodoc
1616
autodoc_execute "$0" "$@"
1717
exit
1818
fi
1919

20-
[[ $BASHUTILS_FILES_LOADED ]] && return
20+
[[ $BASHFUL_FILES_LOADED ]] && return
2121

22-
source bashutils-messages
23-
source bashutils-modes
24-
source bashutils-utils
22+
source bashful-messages
23+
source bashful-modes
24+
source bashful-utils
2525

2626
commonpath() #{{{1
2727
{
@@ -550,4 +550,4 @@ truncate() #{{{1
550550

551551
#}}}1
552552

553-
BASHUTILS_FILES_LOADED=1
553+
BASHFUL_FILES_LOADED=1

bashutils-input.sh

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
#!/bin/bash
22

3-
# Filename: bashutils-input.sh
3+
# Filename: bashful-input.sh
44
# Description: A set of functions for interacting with the user.
55
# Maintainer: Jeremy Cantrell <jmcantrell@gmail.com>
6-
# Last Modified: Tue 2010-02-09 22:59:21 (-0500)
6+
# Last Modified: Wed 2010-02-10 10:22:29 (-0500)
77

8-
# autodoc-begin bashutils-input {{{
8+
# autodoc-begin bashful-input {{{
99
#
1010
# The input library provides functions for taking user input.
1111
#
@@ -17,19 +17,19 @@
1717
# The INTERACTIVE variable only matters if the function is used with the
1818
# interactive mode check option (-c).
1919
#
20-
# autodoc-end bashutils-input }}}
20+
# autodoc-end bashful-input }}}
2121

2222
if (( ${BASH_LINENO:-0} == 0 )); then
23-
source bashutils-autodoc
23+
source bashful-autodoc
2424
autodoc_execute "$0" "$@"
2525
exit
2626
fi
2727

28-
[[ $BASHUTILS_INPUT_LOADED ]] && return
28+
[[ $BASHFUL_INPUT_LOADED ]] && return
2929

30-
source bashutils-messages
31-
source bashutils-modes
32-
source bashutils-utils
30+
source bashful-messages
31+
source bashful-modes
32+
source bashful-utils
3333

3434
input() #{{{1
3535
{
@@ -239,4 +239,4 @@ choice() #{{{1
239239

240240
#}}}1
241241

242-
BASHUTILS_INPUT_LOADED=1
242+
BASHFUL_INPUT_LOADED=1

bashutils-messages.sh

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
#!/bin/bash
22

3-
# Filename: bashutils-messages.sh
3+
# Filename: bashful-messages.sh
44
# Description: A set of functions for giving the user information.
55
# Maintainer: Jeremy Cantrell <jmcantrell@gmail.com>
6-
# Last Modified: Tue 2010-02-09 22:59:57 (-0500)
6+
# Last Modified: Wed 2010-02-10 10:22:55 (-0500)
77

8-
# autodoc-begin bashutils-messages {{{
8+
# autodoc-begin bashful-messages {{{
99
#
1010
# The messages library provides functions for notifying the user.
1111
#
@@ -17,19 +17,19 @@
1717
# The VERBOSE variable only matters if the function is used with the verbose
1818
# mode check option (-c).
1919
#
20-
# autodoc-end bashutils-messages }}}
20+
# autodoc-end bashful-messages }}}
2121

2222
if (( ${BASH_LINENO:-0} == 0 )); then
23-
source bashutils-autodoc
23+
source bashful-autodoc
2424
autodoc_execute "$0" "$@"
2525
exit
2626
fi
2727

28-
[[ $BASHUTILS_MESSAGES_LOADED ]] && return
28+
[[ $BASHFUL_MESSAGES_LOADED ]] && return
2929

30-
source bashutils-modes
31-
source bashutils-terminfo
32-
source bashutils-utils
30+
source bashful-modes
31+
source bashful-terminfo
32+
source bashful-utils
3333

3434
z() #{{{1
3535
{
@@ -224,4 +224,4 @@ warn() #{{{1
224224

225225
#}}}1
226226

227-
BASHUTILS_MESSAGES_LOADED=1
227+
BASHFUL_MESSAGES_LOADED=1

bashutils-modes.sh

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
#!/bin/bash
22

3-
# Filename: bashutils-modes.sh
3+
# Filename: bashful-modes.sh
44
# Description: Set of functions to interact with different script modes.
55
# Maintainer: Jeremy Cantrell <jmcantrell@gmail.com>
6-
# Last Modified: Tue 2010-02-09 23:13:06 (-0500)
6+
# Last Modified: Wed 2010-02-10 10:23:24 (-0500)
77

8-
# autodoc-begin bashutils-modes {{{
8+
# autodoc-begin bashful-modes {{{
99
#
1010
# The modes library provides functions for using getting/setting mode values.
1111
#
@@ -34,17 +34,17 @@
3434
#
3535
# verbose && echo "Verbose mode is set!"
3636
#
37-
# autodoc-end bashutils-modes }}}
37+
# autodoc-end bashful-modes }}}
3838

3939
if (( ${BASH_LINENO:-0} == 0 )); then
40-
source bashutils-autodoc
40+
source bashful-autodoc
4141
autodoc_execute "$0" "$@"
4242
exit
4343
fi
4444

45-
[[ $BASHUTILS_MODES_LOADED ]] && return
45+
[[ $BASHFUL_MODES_LOADED ]] && return
4646

47-
source bashutils-utils
47+
source bashful-utils
4848

4949
gui() #{{{1
5050
{
@@ -170,4 +170,4 @@ verbose_execute() #{{{1
170170

171171
#}}}1
172172

173-
BASHUTILS_MODES_LOADED=1
173+
BASHFUL_MODES_LOADED=1

bashutils-profile.sh

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
#!/bin/bash
22

3-
# Filename: bashutils-profile.sh
3+
# Filename: bashful-profile.sh
44
# Description: Utilities for using script profiles.
55
# Maintainer: Jeremy Cantrell <jmcantrell@gmail.com>
6-
# Last Modified: Tue 2010-02-09 23:44:36 (-0500)
6+
# Last Modified: Wed 2010-02-10 10:23:47 (-0500)
77

8-
# autodoc-begin bashutils-profile {{{
8+
# autodoc-begin bashful-profile {{{
99
#
1010
# The profile library provides functions for using profiles in scripts.
1111
#
@@ -43,28 +43,28 @@
4343
#
4444
# In summary, before any functionality can be used, you must do the following:
4545
#
46-
# source bashutils-profile
46+
# source bashful-profile
4747
#
4848
# PROFILE_NAME=myapp
4949
# PROFILE_DEFAULT="..."
5050
#
5151
# profile_init # This will return non-zero exit code on error.
5252
#
53-
# autodoc-end bashutils-profile }}}
53+
# autodoc-end bashful-profile }}}
5454

5555
if (( ${BASH_LINENO:-0} == 0 )); then
56-
source bashutils-autodoc
56+
source bashful-autodoc
5757
autodoc_execute "$0" "$@"
5858
exit
5959
fi
6060

61-
[[ $BASHUTILS_PROFILE_LOADED ]] && return
61+
[[ $BASHFUL_PROFILE_LOADED ]] && return
6262

63-
source bashutils-files
64-
source bashutils-input
65-
source bashutils-messages
66-
source bashutils-modes
67-
source bashutils-utils
63+
source bashful-files
64+
source bashful-input
65+
source bashful-messages
66+
source bashful-modes
67+
source bashful-utils
6868

6969
profile_actions() #{{{1
7070
{
@@ -313,4 +313,4 @@ profile_verify() #{{{1
313313

314314
#}}}1
315315

316-
BASHUTILS_PROFILE_LOADED=1
316+
BASHFUL_PROFILE_LOADED=1

bashutils-terminfo.sh

Lines changed: 9 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,24 @@
11
#!/bin/bash
22

3-
# Filename: bashutils-terminfo.sh
3+
# Filename: bashful-terminfo.sh
44
# Description: Sets terminal strings for things like color, bold, etc.
55
# Maintainer: Jeremy Cantrell <jmcantrell@gmail.com>
6-
# Last Modified: Tue 2010-02-09 23:47:47 (-0500)
6+
# Last Modified: Wed 2010-02-10 10:26:15 (-0500)
77

8-
# autodoc-begin bashutils-autodoc {{{
8+
# autodoc-begin bashful-terminfo {{{
99
#
10-
# The autodoc library provides a way to extract documentation from scripts.
10+
# The terminfo library provides variables for altering the appearance of
11+
# terminal output (bold, italics, underline, colors, etc).
1112
#
12-
# Normally, I would prefer to use getopts to setup a -h/--help option, but in
13-
# some cases it isn't practical or it can conflict with other functions. This
14-
# provides a nice alternative with no side-effects.
15-
#
16-
# Within the script, a section of documentation is denoted like this:
17-
#
18-
# # autodoc-begin NAME
19-
# #
20-
# # DOCUMENTATION TEXT GOES HERE
21-
# #
22-
# # autodoc-end NAME
23-
#
24-
# autodoc-end bashutils-autodoc }}}
13+
# autodoc-end bashful-terminfo }}}
2514

2615
if (( ${BASH_LINENO:-0} == 0 )); then
27-
source bashutils-autodoc
16+
source bashful-autodoc
2817
autodoc_execute "$0" "$@"
2918
exit
3019
fi
3120

32-
[[ $BASHUTILS_TERMINFO_LOADED ]] && return
21+
[[ $BASHFUL_TERMINFO_LOADED ]] && return
3322

3423
term_reset=$(tput sgr0 2>/dev/null)
3524
term_bold=$(tput bold 2>/dev/null)
@@ -58,4 +47,4 @@ if (( $(tput colors) >= 8 )); then
5847
term_bg_white=$(tput setbf 7 2>/dev/null)
5948
fi
6049

61-
BASHUTILS_TERMINFO_LOADED=1
50+
BASHFUL_TERMINFO_LOADED=1

0 commit comments

Comments
 (0)