diff options
author | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
commit | e0c6872cf40896c7be36b11dcc744620f10adf1d (patch) | |
tree | 60335e10d2f4354b0674ec22d7b53f0f8abee672 /support/copac-clean/copac-clean.sh |
Initial commit
Diffstat (limited to 'support/copac-clean/copac-clean.sh')
-rwxr-xr-x | support/copac-clean/copac-clean.sh | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/support/copac-clean/copac-clean.sh b/support/copac-clean/copac-clean.sh new file mode 100755 index 0000000000..aa31f7011a --- /dev/null +++ b/support/copac-clean/copac-clean.sh @@ -0,0 +1,21 @@ +#!/bin/bash +# copac-clean.sh +# version 0.8 +# 28.08.2015 +# Copyright (C) Guido Milanese guido.milanese@unicatt.it +# requires copac-clean.sno +# requires xclip: xclip copies to the clipboard +# checks if xclip and snobol4 are installed + if ! type xclip > /dev/null 2>&1; then + echo "xclip is not installed. Exiting."; + exit; + elif ! type snobol4 > /dev/null 2>&1; then + echo "snobol4 is not installed. Exiting."; + exit; + fi + rm -f copactmpfile # if the case + CCDIR=$(dirname $(which copac-clean.sh)) + cd $CCDIR # important for desktop launcher! + snobol4 -b $CCDIR/copac-clean.sno >copactmpfile + cat copactmpfile | xclip -selection c -i + rm -f copactmpfile |