Skip to content

Commit

Permalink
bin/bashlets is now the only library entry point.
Browse files Browse the repository at this point in the history
  • Loading branch information
Roberto Reale committed Mar 13, 2018
1 parent 16fd5ad commit 5b53516
Show file tree
Hide file tree
Showing 43 changed files with 54 additions and 121 deletions.
67 changes: 0 additions & 67 deletions bin/bashlet

This file was deleted.

2 changes: 1 addition & 1 deletion bin/bashlets
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#
# bashlets -- A modular extensible toolbox for Bash
#
# Library management
# Library bootstrapping and main entry point
#
# Copyright (c) 2014-8 Roberto Reale
#
Expand Down
4 changes: 2 additions & 2 deletions bin/bashlets-list
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
################################################################################


source bashlet library/origin
source bashlet library/local
source bashlets library/origin
source bashlets library/local

#
# global variables
Expand Down
2 changes: 1 addition & 1 deletion bin/bashlets-methods
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
#
################################################################################

source bashlet library/loader
source bashlets library/loader


#
Expand Down
2 changes: 1 addition & 1 deletion lib/basic/shell
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
################################################################################


source bashlet datatype/version
source bashlets datatype/version

#@public
function bashlets::basic::shell::get_full_version()
Expand Down
6 changes: 3 additions & 3 deletions lib/cache/fs
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@
################################################################################


source bashlet marshal/dump
source bashlet os/tempdir
source bashlet datatype/object
source bashlets marshal/dump
source bashlets os/tempdir
source bashlets datatype/object


function __bashlets::cache::fs::cache_to_path()
Expand Down
2 changes: 1 addition & 1 deletion lib/datatype/byte
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
################################################################################


source bashlet datatype/number
source bashlets datatype/number

#@public
function bashlets::datatype::byte::validate()
Expand Down
2 changes: 1 addition & 1 deletion lib/datatype/counter
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
#
################################################################################

source bashlet os/tempfile
source bashlets os/tempfile


#@public
Expand Down
2 changes: 1 addition & 1 deletion lib/datatype/float
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
################################################################################


source bashlet datatype/number
source bashlets datatype/number

#@public
function bashlets::datatype::float::validate()
Expand Down
2 changes: 1 addition & 1 deletion lib/datatype/integer
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
#
################################################################################

source bashlet datatype/number
source bashlets datatype/number


#@public
Expand Down
6 changes: 3 additions & 3 deletions lib/datatype/string
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@
################################################################################


source bashlet stream/reorder
source bashlet stream/reshape
source bashlet os/random
source bashlets stream/reorder
source bashlets stream/reshape
source bashlets os/random

#@public
function bashlets::datatype::string::chop()
Expand Down
2 changes: 1 addition & 1 deletion lib/datatype/unsigned
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
################################################################################


source bashlet datatype/number
source bashlets datatype/number

#@public
function bashlets::datatype::unsigned::validate()
Expand Down
2 changes: 1 addition & 1 deletion lib/datatype/uuid
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
################################################################################


source bashlet os/random
source bashlets os/random


function __bashlets::datatype::uuid::create()
Expand Down
2 changes: 1 addition & 1 deletion lib/library/interact
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
################################################################################


source bashlet library/version
source bashlets library/version

#@public
function bashlets::library::interact::say_hello()
Expand Down
2 changes: 1 addition & 1 deletion lib/library/local
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
################################################################################


source bashlet datatype/sha1
source bashlets datatype/sha1
BASHLETS_BASE=~/.bashlets


Expand Down
2 changes: 1 addition & 1 deletion lib/library/origin
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
################################################################################


source bashlet api/github
source bashlets api/github

#@public
function bashlets::library::origin::list_packages()
Expand Down
2 changes: 1 addition & 1 deletion lib/library/version
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@

BASHLETS_VERSION=1.0

source bashlet datatype/version
source bashlets datatype/version


#@public
Expand Down
2 changes: 1 addition & 1 deletion lib/marshal/dump
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
################################################################################


source bashlet datatype/object
source bashlets datatype/object


#@public
Expand Down
2 changes: 1 addition & 1 deletion lib/math/integer
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
################################################################################


source bashlet datatype/number
source bashlets datatype/number


#@public
Expand Down
4 changes: 2 additions & 2 deletions lib/math/ipair
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
################################################################################


source bashlet datatype/number
source bashlet glue/awklibrary
source bashlets datatype/number
source bashlets glue/awklibrary

#
# extended euclidean algorithm
Expand Down
8 changes: 4 additions & 4 deletions lib/os/block
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@
################################################################################


source bashlet datatype/number
source bashlet datatype/version
source bashlet os/kernel
source bashlet os/mounts
source bashlets datatype/number
source bashlets datatype/version
source bashlets os/kernel
source bashlets os/mounts


# cf. https://www.kernel.org/doc/Documentation/sysfs-rules.txt
Expand Down
2 changes: 1 addition & 1 deletion lib/os/ramdisk
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
################################################################################


source bashlet os/tempdir
source bashlets os/tempdir

#@public
function bashlets::os::ramdisk::create()
Expand Down
2 changes: 1 addition & 1 deletion lib/os/random
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
################################################################################


source bashlet datatype/unsigned
source bashlets datatype/unsigned

# generate a random stream of length $SIZE, including only character in $FILTER
# a /dev/urandom device a la Linux is required
Expand Down
2 changes: 1 addition & 1 deletion lib/stl/namespace
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
################################################################################


source bashlet stl/stack
source bashlets stl/stack

#@public
function bashlets::stl::namespace::exists()
Expand Down
4 changes: 2 additions & 2 deletions lib/stream/append
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
################################################################################


source bashlet stream/filter
source bashlet os/tempfile
source bashlets stream/filter
source bashlets os/tempfile

#@public
function bashlets::stream::append::generic()
Expand Down
2 changes: 1 addition & 1 deletion lib/stream/convert
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
################################################################################


source bashlet datatype/string
source bashlets datatype/string


#@public
Expand Down
4 changes: 2 additions & 2 deletions lib/stream/interpolate
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
################################################################################


source bashlet os/tempfile
source bashlet marshal/uneval
source bashlets os/tempfile
source bashlets marshal/uneval


function __bashlets::stream::interpolate::callback_plain()
Expand Down
2 changes: 1 addition & 1 deletion lib/time/date
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
################################################################################


source bashlet time/month
source bashlets time/month

# based on http://cfajohnson.com/shell/date-functions/?random_date

Expand Down
2 changes: 1 addition & 1 deletion lib/time/elapsed
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
################################################################################


source bashlet datatype/number
source bashlets datatype/number

#@public
function bashlets::time::elapsed::seconds_to_formatted()
Expand Down
2 changes: 1 addition & 1 deletion lib/time/month
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
#
################################################################################

source bashlet time/year
source bashlets time/year


# based on http://cfajohnson.com/shell/date-functions/?days_in_month
Expand Down
4 changes: 2 additions & 2 deletions lib/ux/repl
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
#
################################################################################

source bashlet cache/fs # TODO: generalize!
source bashlet os/term
source bashlets cache/fs # TODO: generalize!
source bashlets os/term


BASHLETS_UX_REPL_ERR_INVALID_ARG=2
Expand Down
2 changes: 1 addition & 1 deletion tests/api/github.bats
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bats

source bashlet api/github
source bashlets api/github

@test "api/github: list GitHub repositories for a given user" {
(bash$$ github list_repos_by_user | grep ^bashlets$)
Expand Down
2 changes: 1 addition & 1 deletion tests/datatype/sha1.bats
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bats

source bashlet datatype/sha1
source bashlets datatype/sha1

@test "datatype/sha1: validate a sha1 hash" {
(bash$$ sha1 validate 51609e571cf9dcf5aaccd0fd9b95a55ae3d4a093)
Expand Down
2 changes: 1 addition & 1 deletion tests/datatype/string.bats
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bats

source bashlet datatype/string
source bashlets datatype/string

@test "datatype/string: chop a string" {
s="foo
Expand Down
2 changes: 1 addition & 1 deletion tests/library/interact.bats
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bats

source bashlet library/interact
source bashlets library/interact

@test "library/interact: say hello" {
result="$(bash$$ interact say_hello)"
Expand Down

0 comments on commit 5b53516

Please sign in to comment.