Merge branch 'master' of https://github.com/xxh/xxh-shell-sample
This commit is contained in:
commit
1e73fddb40
@ -3,14 +3,14 @@
|
|||||||
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)!
|
||||||
|
|
||||||
## xxh-shell example
|
## 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).
|
||||||
|
@ -14,9 +14,10 @@ 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:
|
||||||
wget https://your_portable_shell
|
wget https://your_portable_shell
|
||||||
|
@ -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
|
||||||
@ -28,4 +28,4 @@ cd $CURRENT_DIR
|
|||||||
#
|
#
|
||||||
# Run the portable shell
|
# Run the portable shell
|
||||||
#
|
#
|
||||||
./your_portable_shell # $EXECUTE_FILE $EXECUTE_COMMAND $VERBOSE
|
./your_portable_shell # $EXECUTE_FILE $EXECUTE_COMMAND $VERBOSE
|
||||||
|
Loading…
Reference in New Issue
Block a user