Skip to content

Commit 24d9cb7

Browse files
committed
Remove unnecessary check from script
The script now simply checks if ~/.simpleargs.d/simpleargs exists but not if it's readable. That will be implicitly handled when it is sourced.
1 parent 99f170f commit 24d9cb7

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ install files related to [simpleargs](https://github.com/laurivan/simpleargs) un
1010
your home directory in `~/.simpleargs.d/`.
1111

1212
```bash
13-
SUBNET_VERSION='v0.2.0'
13+
SUBNET_VERSION='v0.2.1'
1414
wget -O ~/.local/bin/subnet https://github.com/eetami/subnet/releases/download/${SUBNET_VERSION}/subnet
1515
subnet -h
1616
man subnet

src/subnet

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ SCRIPT=$(basename $0)
88
if [ ! -v SIMPLEARGS ] || [ ! -r "$SIMPLEARGS" ]; then
99
SIMPLEARGS_DIR="${HOME}/.simpleargs.d"
1010
SIMPLEARGS="${SIMPLEARGS_DIR}/simpleargs"
11-
if [ ! -r $SIMPLEARGS ]; then
12-
[ -e SIMPLEARGS ] && { echo "ERROR: File exists $SIMPLEARGS but is not readable!" >&2; exit 1; }
11+
if [ ! -f $SIMPLEARGS ]; then
1312
[ ! -d $SIMPLEARGS_DIR ] && mkdir $SIMPLEARGS_DIR
1413
SIMPLEARGS_VERSION='v0.2.0'
1514
SIMPLEARGS_URL="https://github.com/laurivan/simpleargs/releases/download/${SIMPLEARGS_VERSION}/simpleargs-${SIMPLEARGS_VERSION}"

0 commit comments

Comments
 (0)