6 Commits
1.2 ... 1.4

Author SHA1 Message Date
453a453f4f version bump 2023-09-16 22:07:39 +02:00
31b5e29c69 echo ssh command 2023-09-16 22:03:41 +02:00
8b10b4b709 stable build uses s3h.sh version no 2023-09-16 22:01:07 +02:00
aad26d3fdd add version + -v cli parameter 2023-09-16 21:53:58 +02:00
87a453c24c added quickstart instructions 2023-09-08 22:59:28 +02:00
19eef79c2d example global options file 2023-09-03 20:43:17 +02:00
4 changed files with 22 additions and 1 deletions

View File

@ -9,3 +9,10 @@ Select a ssh config file which will be used to connect to a host via - you guess
``` ```
Sample structure of `start directory` can be found in `test`. Sample structure of `start directory` can be found in `test`.
## Quickstart
```
mkdir ~/.s3h
touch root@example.org
./s3h.sh
```

View File

@ -2,10 +2,15 @@
NAME=s3h NAME=s3h
VERSION=1.2 VERSION=`../../s3h.sh -v`
REVISION=1 REVISION=1
ARCH=all ARCH=all
if ! git tag -l |fgrep $VERSION; then
git tag $VERSION
git push origin $VERSION
fi
curdir=`dirname $0` curdir=`dirname $0`
workdir="$curdir/${NAME}_${VERSION}-${REVISION}_${ARCH}" workdir="$curdir/${NAME}_${VERSION}-${REVISION}_${ARCH}"
mkdir -p "$workdir" mkdir -p "$workdir"

8
s3h.sh
View File

@ -3,6 +3,13 @@
# config # config
DIALOG=dialog #gdialog kdialog DIALOG=dialog #gdialog kdialog
START_DIR='~/.s3h' START_DIR='~/.s3h'
VERSION="1.4"
# TODO: use opt parsing
if [[ $# -eq 1 && "$1" == "-v" ]]; then
echo "$VERSION"
exit 0
fi
if [[ $# -eq 1 && -d "$1" ]]; then if [[ $# -eq 1 && -d "$1" ]]; then
START_DIR="$1" START_DIR="$1"
@ -89,5 +96,6 @@ if [[ -f "$configFile" ]]; then
echo "config file '$configFile' selected. connecting..." echo "config file '$configFile' selected. connecting..."
# execute ssh # execute ssh
echo "Running 'ssh ${para[@]} `basename \"$configFile\"`'"
ssh ${para[@]} `basename "$configFile"` ssh ${para[@]} `basename "$configFile"`
fi fi

1
test/foo11/.options Normal file
View File

@ -0,0 +1 @@
-o AddKeysToAgent=yes