This commit is contained in:
anki-code 2020-03-08 12:31:41 +03:00
commit 1e73fddb40
3 changed files with 16 additions and 15 deletions

View File

@ -3,14 +3,14 @@
1. Fork this repo to create your [xxh](https://github.com/xxh/xxh) shell entrypoint.
2. Rename your repo to `xxh-shell-myshell`
3. Install [xxh](https://github.com/xxh/xxh) and run once to creating `~/.xxh`
4. `cd ~/.xxh/shells && git clone https://github.com/you/xxh-shell-myshell && cd xxh-shell-myshell`
4. `cd ~/.xxh/xxh/shells && git clone https://github.com/you/xxh-shell-myshell && cd xxh-shell-myshell`
5. Edit `build.xsh` script
6. Edit `entrypoint.sh` script
7. Run `./build.xsh`
8. Try to connect `xxh myhost +s xxh-shell-myshell`
8. Try to connect `xxh myhost +s xxh-shell-myshell` (add `+if` to force reinstall)
9. If everything works commit and push your changes
10. You rock! [Tell us about your work](https://gitter.im/xonssh-xxh/community)!
## xxh-shell example
Real life example of creating xxh-shell and xxh-plugins you could find in [xxh-shell-xonsh-appimage](https://github.com/xxh/xxh-shell-xonsh-appimage).
Real life example of creating xxh-shell and xxh-plugins you could find in [xxh-shell-xonsh-appimage](https://github.com/xxh/xxh-shell-xonsh-appimage).

View File

@ -14,9 +14,10 @@ script_dir = pf"{__file__}".absolute().parent
build_dir = script_dir / 'build'
rm -rf @(build_dir)/
mkdir -p @(build_dir)
cd @(build_dir)
cp @(script_dir / 'entrypoint.sh') @(build_dir)/
cd @(build_dir)
if p'your_portable_shell'.exists():
eprint('SKIP: Portable shell already builded')
else:
wget https://your_portable_shell
wget https://your_portable_shell

View File

@ -9,15 +9,15 @@
# -c <command> Execute command on host, print the result and exit
# -v Verbose mode to debug
#
while getopts f:c:v: option
do
case "${option}"
in
f) EXECUTE_FILE=${OPTARG};;
c) EXECUTE_COMMAND=${OPTARG};;
v) VERBOSE=${OPTARG};;
esac
done
#while getopts f:c:v: option
#do
#case "${option}"
#in
#f) EXECUTE_FILE=${OPTARG};;
#c) EXECUTE_COMMAND=${OPTARG};;
#v) VERBOSE=${OPTARG};;
#esac
#done
#
# Move to current directory
@ -28,4 +28,4 @@ cd $CURRENT_DIR
#
# Run the portable shell
#
./your_portable_shell # $EXECUTE_FILE $EXECUTE_COMMAND $VERBOSE
./your_portable_shell # $EXECUTE_FILE $EXECUTE_COMMAND $VERBOSE