Skip to content
Snippets Groups Projects
Commit 7c50bee5 authored by Lucas Vinicius Semprebom Gonçalves's avatar Lucas Vinicius Semprebom Gonçalves
Browse files

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

parent 1dd7f078
Branches
No related tags found
1 merge request!10Fix Le Multiterminal Lic
Package: le-multiterminal-lic Package: le-multiterminal-lic
Priority: important Priority: important
Section: main Section: main
Version: 0.0.3 Version: 0.0.7
Maintainer: LE Maintainer <le-maintainer@c3sl.ufpr.br> Maintainer: LE Maintainer <le-maintainer@c3sl.ufpr.br>
Description: Userful multiplier license for Linux Educacional 5 Description: Userful multiplier license for Linux Educacional 5
Architecture: all Architecture: all
......
...@@ -20,9 +20,21 @@ ...@@ -20,9 +20,21 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
# USA. # USA.
LicExt="1box.info" # Paths
DirLic="/etc/userful/license" DirLic="/etc/userful/license/"
LicExt="1Box.info"
if [ -f $DirLic/*$LicF ]; then # List of file to divert
rm -f $DirLic/*$LicF 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 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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment