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,11 +3,11 @@
1. Fork this repo to create your [xxh](https://github.com/xxh/xxh) shell entrypoint. 1. Fork this repo to create your [xxh](https://github.com/xxh/xxh) shell entrypoint.
2. Rename your repo to `xxh-shell-myshell` 2. Rename your repo to `xxh-shell-myshell`
3. Install [xxh](https://github.com/xxh/xxh) and run once to creating `~/.xxh` 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 5. Edit `build.xsh` script
6. Edit `entrypoint.sh` script 6. Edit `entrypoint.sh` script
7. Run `./build.xsh` 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 9. If everything works commit and push your changes
10. You rock! [Tell us about your work](https://gitter.im/xonssh-xxh/community)! 10. You rock! [Tell us about your work](https://gitter.im/xonssh-xxh/community)!

View File

@ -14,8 +14,9 @@ script_dir = pf"{__file__}".absolute().parent
build_dir = script_dir / 'build' build_dir = script_dir / 'build'
rm -rf @(build_dir)/ rm -rf @(build_dir)/
mkdir -p @(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(): if p'your_portable_shell'.exists():
eprint('SKIP: Portable shell already builded') eprint('SKIP: Portable shell already builded')
else: else:

View File

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