From 79e7db5ed279548bc4b862cd402807ff0e7d8209 Mon Sep 17 00:00:00 2001 From: Armaan Bhojwani <3fb650a9-b47e-4604-a282-1dd91953b2ee@anonaddy.me> Date: Mon, 2 Nov 2020 13:13:47 -0500 Subject: [PATCH] updated for Sarge --- Dockerfile | 4 ++-- README.md | 16 +++++++++++----- src/CMakeLists.txt | 1 - 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index 82f372d..112a123 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ FROM debian:buster-slim AS builder RUN apt-get update && apt-get install -y cmake gcc g++ git libreadline-dev make -RUN git clone https://codeberg.org/armaan/gen-shell.git /app +RUN git clone --recursive https://codeberg.org/armaan/gen-shell.git /app WORKDIR /app RUN cmake --configure . RUN cmake --build . @@ -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 $CMD +ENTRYPOINT ./gen-shell -c $CMD diff --git a/README.md b/README.md index a7d8e30..b696a29 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. This is a fork of [taskshell](https://github.com/GothenburgBitFactory/taskshell) with a highly reduce codebase. ## Usage -Just put the command that you want to repeat after `gen-shell`, eg; `gen-shell ls`, or even something much more complex like `gen-shell "cd /home/armaa/Clone/words && /home/armaa/Clone/words/bin/words` This command was actually the inspiration for gen-shell. +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. ## Installation ### Binaries @@ -17,8 +17,14 @@ If you would like to avoid this, you can build from source. Doing so requires: - g++ (sometimes packaged as gcc-c++ or gcc-g++) - cpp (11 or higher) - libreadline development files (7 or 8 is fine, 5 is untested) + +On a Debian or Ubuntu based distribution, you can install these dependencies with this command: +```bash +sudo apt update && sudo apt install cmake make gcc g++ cpp libreadline-dev +``` + ```bash -git clone https://codeberg.org/armaan/gen-shell +git clone --recursive https://codeberg.org/armaan/gen-shell cd gen-shell cmake . make @@ -32,11 +38,11 @@ You can also run gen-shell in docker. Simply use ```bash docker run -it -e CMD= armaanb/gen-shell:latest ``` -Or to build the docker container locally +Or to build the docker container locally, which ensures that you are using the latest version, or lets you make changes to the source code before building: ```bash -git clone https://codeberg.org/armaan/gen-shell +git clone --recursive https:/codeberg.org/armaan/gen-shell cd gen-shell -docker build -t armaanb/gen-shell:latest . +docker build --no-cache -t armaanb/gen-shell:latest . docker run -it -e CMD= armaanb/gen-shell ``` ## License diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 8f0418b..e67bb26 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,7 +1,6 @@ cmake_minimum_required (VERSION 2.8) include_directories (${CMAKE_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/src - ${CMAKE_SOURCE_DIR}/src/libshared/src ${GEN-SHELL_INCLUDE_DIRS}) set (gen-shell_SRCS prompt.cpp -- 2.39.2