diff --git a/.githooks.yml b/.githooks.yml index 2f90e81..87df4ad 100644 --- a/.githooks.yml +++ b/.githooks.yml @@ -2,7 +2,7 @@ repos: # Set the list of basic git hooks to find and fix common problems in the current working tree. - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.0.1 + rev: f71fa2c1f9cf5cb705f73dffe4b21f7c61470ba9 hooks: - id: check-executables-have-shebangs - id: check-yaml diff --git a/.github/.gitkeep b/.github/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..422eeeb --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,17 @@ +name: detach build + +on: + push: + branches: + - "master" + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Step -- 1. + uses: actions/checkout@v3 + + - name: Step -- 2. + run: gcc -Wall -Wextra -Werror -Wno-unused-parameter detach.c -o detach diff --git a/.gitkeep b/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 94bfd4b..0000000 --- a/.travis.yml +++ /dev/null @@ -1,8 +0,0 @@ -language: c - -compiler: - - clang # it is the preferred compiler for mac operating systems - - gcc - -script: - - ${CC} -Wall -Wextra -Werror -Wno-unused-parameter detach.c -o detach diff --git a/README.markdown b/README.md similarity index 95% rename from README.markdown rename to README.md index 86cb72f..7ca9a0c 100644 --- a/README.markdown +++ b/README.md @@ -1,5 +1,7 @@ # detach-process +![build](https://github.com/vladpunko/detach-process/actions/workflows/build.yml/badge.svg) + Spawn a new process and detach it from the current interactive session. ![usage-example](https://raw.githubusercontent.com/vladpunko/detach-process/master/detach.gif) diff --git a/detach.gif b/detach.gif index 02c6029..81009de 100644 Binary files a/detach.gif and b/detach.gif differ diff --git a/install.sh b/install.sh index 362a619..b7876f9 100755 --- a/install.sh +++ b/install.sh @@ -13,6 +13,11 @@ fi workdir="$(mktemp -d)" +_cleanup() { + rm -f -r -- "${workdir}" +} +trap _cleanup 0 1 2 3 6 + # Step -- 1. git clone --depth=1 --branch=master -- https://github.com/vladpunko/detach-process.git "${workdir}" > /dev/null 2>&1 || { echo 'An error occurred while downloading the source code to the current machine.' >&2 @@ -25,8 +30,3 @@ gcc -Wall -Wextra -Werror -Wno-unused-parameter "${workdir}/detach.c" -o "${work # Step -- 3. install -m 755 "${workdir}/detach" /usr/local/bin/detach - -_cleanup() { - rm -f -r -- "${workdir}" -} -trap _cleanup 0 1 2 3 6