-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathset-development.sh
executable file
·26 lines (18 loc) · 1.3 KB
/
set-development.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/bash
kohaplugindir="$(grep -Po '(?<=<pluginsdir>).*?(?=</pluginsdir>)' $KOHA_CONF)"
kohadir="$(grep -Po '(?<=<intranetdir>).*?(?=</intranetdir>)' $KOHA_CONF)"
rm -r $kohaplugindir/Koha/Plugin/Fi/KohaSuomi/MorememberBorrowerBarcode
rm $kohaplugindir/Koha/Plugin/Fi/KohaSuomi/MorememberBorrowerBarcode.pm
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
ln -s "$SCRIPT_DIR/Koha/Plugin/Fi/KohaSuomi/MorememberBorrowerBarcode" $kohaplugindir/Koha/Plugin/Fi/KohaSuomi/MorememberBorrowerBarcode
ln -s "$SCRIPT_DIR/Koha/Plugin/Fi/KohaSuomi/MorememberBorrowerBarcode.pm" $kohaplugindir/Koha/Plugin/Fi/KohaSuomi/MorememberBorrowerBarcode.pm
DATABASE=`xmlstarlet sel -t -v 'yazgfs/config/database' $KOHA_CONF`
HOSTNAME=`xmlstarlet sel -t -v 'yazgfs/config/hostname' $KOHA_CONF`
PORT=`xmlstarlet sel -t -v 'yazgfs/config/port' $KOHA_CONF`
USER=`xmlstarlet sel -t -v 'yazgfs/config/user' $KOHA_CONF`
PASS=`xmlstarlet sel -t -v 'yazgfs/config/pass' $KOHA_CONF`
mysql --user=$USER --password="$PASS" --port=$PORT --host=$HOST $DATABASE << END
DELETE FROM plugin_data where plugin_class = 'Koha::Plugin::Fi::KohaSuomi::MorememberBorrowerBarcode';
DELETE FROM plugin_methods where plugin_class = 'Koha::Plugin::Fi::KohaSuomi::MorememberBorrowerBarcode';
END
perl $kohadir/misc/devel/install_plugins.pl