blob: aa31f7011afe07bacddadc10e700cd0b821a9305 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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
|