Post History
Use nohup(1), and redirect stdout and stderr to /dev/null The following works as expected, not having to wait until the PDF is generated. #!/bin/sh test "$1" = "refs/heads/main" || exit 0; ...
Answer
#2: Post edited
- ### Use nohup(1), and redirect stdout and stderr to /dev/null
- The following works as expected, not having to wait until the PDF is generated.
- ```sh
- #!/bin/sh
- test "$1" = "refs/heads/main" || exit 0;
- cd /srv/src/alx/linux/man-pages/man-pages/;
- unset $(git rev-parse --local-env-vars);
- git fetch srv >/dev/null;
- git reset srv/main --hard >/dev/null;
- nohup sh <<__EOF__ >/dev/null 2>&1 &
</dev/null \- scripts/LinuxManBook/build.sh 2>/dev/null \
- | sponge /srv/www/share/dist/man-pages/git/HEAD/man-pages-HEAD.pdf;
- __EOF__
- ```
- ### Use nohup(1), and redirect stdout and stderr to /dev/null
- The following works as expected, not having to wait until the PDF is generated.
- ```sh
- #!/bin/sh
- test "$1" = "refs/heads/main" || exit 0;
- cd /srv/src/alx/linux/man-pages/man-pages/;
- unset $(git rev-parse --local-env-vars);
- git fetch srv >/dev/null;
- git reset srv/main --hard >/dev/null;
- nohup sh <<__EOF__ >/dev/null 2>&1 &
- scripts/LinuxManBook/build.sh 2>/dev/null \
- | sponge /srv/www/share/dist/man-pages/git/HEAD/man-pages-HEAD.pdf;
- __EOF__
- ```
#1: Initial revision
### Use nohup(1), and redirect stdout and stderr to /dev/null The following works as expected, not having to wait until the PDF is generated. ```sh #!/bin/sh test "$1" = "refs/heads/main" || exit 0; cd /srv/src/alx/linux/man-pages/man-pages/; unset $(git rev-parse --local-env-vars); git fetch srv >/dev/null; git reset srv/main --hard >/dev/null; nohup sh <<__EOF__ >/dev/null 2>&1 & </dev/null \ scripts/LinuxManBook/build.sh 2>/dev/null \ | sponge /srv/www/share/dist/man-pages/git/HEAD/man-pages-HEAD.pdf; __EOF__ ```