Skip to content

Commit

Permalink
Merge pull request #14 from cjvirtucio87/readme-fix
Browse files Browse the repository at this point in the history
NA: cleanup; help command for gitversion
  • Loading branch information
cjvirtucio87 authored Mar 6, 2023
2 parents bcd45f3 + f8177f6 commit 5edfa86
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 286 deletions.
8 changes: 2 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ This is a project containing simple bash tools for general use.
## Current tools

1. `gitversion`: a version retrieval tool that uses git depth for the PATCH version
1. `vim-devc`: a script for setting up a devcontainer with the `vim` configs on the host machine
using the `devcontainer.json` of any given local workspace
1. `stowsh`: a dotfiles managing tool

## Installing
Expand All @@ -25,12 +23,10 @@ curl \

## Usage

Documentation is maintained on the code itself for maintainability reasons. Run `helpsh`
on any of these scripts to see their usage information, e.g.:
See the help message of each script for more info, e.g.:

```bash
# assuming these scripts are in your $PATH
helpsh vim-devc
gitversion help
```

## Sample dockerfile
Expand Down
15 changes: 13 additions & 2 deletions bash_tools/bin/gitversion
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,25 @@ set -e
### PATCH is appended to this MAJOR.MINOR to constitute the project's
### SEMVER.

ROOT_DIR="$(dirname "$0")"
readonly ROOT_DIR
function _help {
local line
while read -r line; do
if [[ "${line}" =~ ^### ]]; then
echo "${line/\#\#\#/}"
fi
done < "$(readlink -f "$0")"
}

function _get_newest_commit_versiontxt {
git log -1 --pretty=format:"%h" -- './version.txt' | tr -d '\n'
}

function main {
if [[ "$1" =~ help ]]; then
_help | less
return
fi

if [[ ! -f './version.txt' ]]; then
>&2 echo 'missing version.txt file'
return 1
Expand Down
245 changes: 0 additions & 245 deletions bash_tools/bin/vim-devc

This file was deleted.

33 changes: 0 additions & 33 deletions bash_tools/lib/vim_devc/Dockerfile.sample

This file was deleted.

Empty file.

0 comments on commit 5edfa86

Please sign in to comment.