le-multiterminal-lic: Add dpkg-divert for pre existant license files

parent 1dd7f078
Package: le-multiterminal-lic
Priority: important
Section: main
Version: 0.0.3
Version: 0.0.7
Maintainer: LE Maintainer <le-maintainer@c3sl.ufpr.br>
Description: Userful multiplier license for Linux Educacional 5
Architecture: all
......
......@@ -20,9 +20,21 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
# USA.
LicExt="1box.info"
DirLic="/etc/userful/license"
# Paths
DirLic="/etc/userful/license/"
LicExt="1Box.info"
if [ -f $DirLic/*$LicF ]; then
rm -f $DirLic/*$LicF
# List of file to divert
List="$(ls ${DirLic}/*${LicExt}* 2> /dev/null)"
# Move diverted files back
if [[ "$1" != "upgrade" ]]; then
for file in $List; do
if [[ "${file}" != *".real" ]]; then
if test -e "${file}.real"; then
rm -f "${file}"
fi
fi
dpkg-divert --remove --rename "${file%.real}"
done
fi
#!/bin/bash
#
# Copyright (C) 2004-2012 Centro de Computacao Cientifica e Software Livre
# Departamento de Informatica - Universidade Federal do Parana - C3SL/UFPR
#
# This file is part of le-multiterminal-lic
#
# le-multiterminal-lic is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
# USA.
# Paths
DirLic="/etc/userful/license/"
LicExt="1Box.info"
# Files to divert
license_list="$(ls ${DirLic}/*${LicExt} 2> /dev/null)"
# Divert files
for file in $license_list; do
dpkg-divert --divert "${file}.real" --rename "${file}"
done
exit 0
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment