Lots of fixes.
This commit is contained in:
parent
eb0a4126d3
commit
1b5383bde9
4
.SRCINFO
4
.SRCINFO
|
@ -1,7 +1,7 @@
|
|||
pkgbase = swish
|
||||
pkgdesc = SWI-Prolog for SHaring: a SWI-Prolog web IDE
|
||||
pkgver = r1124.071295b
|
||||
pkgrel = 2
|
||||
pkgrel = 3
|
||||
url = https://github.com/SWI-Prolog/swish
|
||||
install = .install
|
||||
arch = x86_64
|
||||
|
@ -9,6 +9,8 @@ pkgbase = swish
|
|||
makedepends = git
|
||||
makedepends = bower
|
||||
makedepends = sed
|
||||
depends = libxinerama
|
||||
depends = libxpm
|
||||
depends = swi-prolog-devel
|
||||
conflicts = swish-cplint
|
||||
source = git+https://github.com/SWI-Prolog/swish#branch=master
|
||||
|
|
6
.install
6
.install
|
@ -6,11 +6,11 @@ post_install() {
|
|||
|
||||
chown -R swish:swish /usr/share/swish
|
||||
|
||||
printf "\n\nYou can start and enable \
|
||||
swish.service to run the server.\n\n"
|
||||
printf "\n\n%s\n\n" "You can start and enable \
|
||||
swish.service to run the server."
|
||||
}
|
||||
|
||||
post_remove()
|
||||
{
|
||||
printf "\n\nYou can remove swish user and group.\n\n"
|
||||
printf "\n\n%s\n\n" "You can remove swish user and group."
|
||||
}
|
||||
|
|
6
PKGBUILD
6
PKGBUILD
|
@ -2,12 +2,14 @@
|
|||
# Contributor: Franco Masotti <franco dot masotti at student dot unife dot it>
|
||||
pkgname=swish
|
||||
pkgver=r1124.071295b
|
||||
pkgrel=2
|
||||
pkgrel=3
|
||||
pkgdesc="SWI-Prolog for SHaring: a SWI-Prolog web IDE"
|
||||
arch=('x86_64')
|
||||
url="https://github.com/SWI-Prolog/swish"
|
||||
license=('BSD')
|
||||
depends=('swi-prolog-devel')
|
||||
depends=('libxinerama'
|
||||
'libxpm'
|
||||
'swi-prolog-devel')
|
||||
makedepends=('git'
|
||||
'bower'
|
||||
'sed')
|
||||
|
|
25
run.sh
25
run.sh
|
@ -70,7 +70,7 @@ startd()
|
|||
exec swipl --quiet -f "$pkg_dir"/run.pl
|
||||
) &
|
||||
pid="$!"
|
||||
} 1>/dev/null 2>/dev/null
|
||||
}
|
||||
|
||||
write_pid_file "$pid"
|
||||
}
|
||||
|
@ -123,26 +123,15 @@ write_pid_file()
|
|||
fi
|
||||
}
|
||||
|
||||
killd()
|
||||
{
|
||||
# kill action only if process exists.
|
||||
if [ -f "$pid_file" ]; then
|
||||
pid=$(cat "$pid_file")
|
||||
ps -q $pid > /dev/null
|
||||
if [ $? -eq 0 ]; then
|
||||
kill -s TERM $pid
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
option_parser()
|
||||
{
|
||||
getopts ":hks" opt "$@"
|
||||
getopts ":hiks" opt "$@"
|
||||
case "$opt" in
|
||||
h) help ;;
|
||||
k) killd ;;
|
||||
s) startd ;;
|
||||
?) help; return 1 ;;
|
||||
h ) help ;;
|
||||
i ) init ;;
|
||||
k ) killd ;;
|
||||
s ) startd ;;
|
||||
? ) help; return 1 ;;
|
||||
esac
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue