From ed587e970f8083d69f5e4d07aba04ee7435f2e4c Mon Sep 17 00:00:00 2001 From: Armaan Bhojwani <3fb650a9-b47e-4604-a282-1dd91953b2ee@anonaddy.me> Date: Thu, 5 Nov 2020 15:19:20 -0500 Subject: [PATCH] updated dockerfile, install loc --- Dockerfile | 2 +- README.md | 11 +++-------- src/CMakeLists.txt | 2 +- 3 files changed, 5 insertions(+), 10 deletions(-) diff --git a/Dockerfile b/Dockerfile index 112a123..fce7b68 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,4 +9,4 @@ FROM debian:buster-slim AS run RUN apt-get update && apt-get install -y cpp libreadline7 libncurses6 WORKDIR /app COPY --from=builder /app/src/gen-shell . -ENTRYPOINT ./gen-shell -c $CMD +ENTRYPOINT ./gen-shell -c $command -b $before_command -a $after_command -p $custom_prompt diff --git a/README.md b/README.md index 481053d..3a62a96 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ A simple way to turn any command into a shell with arrow key/history support (if compiled with libreadline). Forked from [taskshell](https://github.com/GothenburgBitFactory/taskshell). ## Usage -Just put the command that you want to repeat after the c flag, eg; `gen-shell -c ls`, or even something much more complex like `gen-shell -c "cd /home/armaa/Clone/words && /home/armaa/Clone/words/bin/words"` This command was actually the inspiration for gen-shell. +See `gen-shell --help` ## Installation ### From a binary @@ -27,23 +27,18 @@ Then download and build gen shell: git clone --recursive https://codeberg.org/armaan/gen-shell cd gen-shell cmake . -make -sudo cp src/gen-shell /usr/bin/ +sudo make install ``` -Or, if you don't have root access, you can subsitute the last line with -`cp src/gen-shell ~/.local/bin` - ### Docker You can also run gen-shell in docker. Simply use ```bash -docker run -it -e CMD= armaanb/gen-shell +docker run -it -e command= -e before_command= -e after_command= -e custom_prompt= armaanb/gen-shell ``` Or to build the docker container locally, run: ```bash git clone --recursive https:/codeberg.org/armaan/gen-shell cd gen-shell docker build --no-cache -t gen-shell:latest . -docker run -it -e CMD= gen-shell ``` ## License Following suit from taskshell, gen-shell is MIT licensed by Armaan Bhojwani, 2020. Gen-shell is forked from taskshell, which was developed by [these people](https://github.com/GothenburgBitFactory/taskshell/blob/master/AUTHORS). diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 841ad0f..ecd29b1 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -13,4 +13,4 @@ target_link_libraries (gen-shell_executable gen-shell ${GEN-SHELL_LIBRARIES}) set_property (TARGET gen-shell_executable PROPERTY OUTPUT_NAME "gen-shell") -install (TARGETS gen-shell_executable DESTINATION .) +install (TARGETS gen-shell_executable DESTINATION /usr/bin/) -- 2.39.2