Commit c303fd94 authored by Adriano Luz's avatar Adriano Luz Committed by Lucas Manika Koeb

Added the main scripts for Linux Educacional 5 configuration

Signed-off-by: default avatarAdriano Luz <al08@c3sl.ufpr.br>
parent 5244d237
C3SL - Centro de Computacao Cientifica e Software Livre
Adriano da Luz
Bruno Cesar Ribas
Carlos Carvalho
Cleide Luzia Bonfim Possamai
Eduardo Todt
Erik Alexandre Pucci
Juliana Bueno
Klismann Smoger Mottin
Laura Sanchez Garcia
Luis Carlos Erpen de Bona
Marcos Castilho
Thiago Henrique Dos Santos Picharski
Log system
Detect all possible hardwares
#!/bin/bash
# gerar.sh
# Copyright (c) 2006 by Bruno Ribas <ribas@ufpr.br>
DIRTMP=$(mktemp -d)
VERSAO=$(cat VERSAO)
#arrumar versao
#$1 tipo de incremento
MAJOR=$(echo $VERSAO| cut -d'.' -f1)
MINOR=$(echo $VERSAO| cut -d'.' -f2)
REVISION=$(echo $VERSAO| cut -d'.' -f3)
case $1 in
Minor)
((MINOR++))
REVISION=0
;;
Major)
((MAJOR++))
MINOR=0
REVISION=0
;;
help)
echo "Uso: $0 Major|Minor|Revision"
echo ' Major - Altera versao Major'
echo ' Minor - Altera versao Minor'
exit
;;
*)
((REVISION++))
;;
esac
VERSAO="${MAJOR}.${MINOR}.${REVISION}"
echo "$VERSAO" > VERSAO
#Compila a documentacao do pacote no diretorio doc/
#cd doc/
#hevea -text *.tex
#hevea -text *.tex
#cd ../
cp -r pacote $DIRTMP
#Copia a documentacao compilada para dentro do pacote.
#cp doc/*.txt $DIRTMP/pacote/usr/share/doc/prd-*
cd $DIRTMP
find . -name ".svn" -exec rm -rf {} \; &>/dev/null
sed -i -e "s/Version:/Version: $VERSAO/" pacote/DEBIAN/control
fakeroot dpkg -b pacote .
cd -
cp $DIRTMP/*deb .
rm -rf $DIRTMP
# vim:tabstop=4:shiftwidth=4:encoding=iso-8859-1
Package: le5-conf
Priority: important
Section: main
Version:
Maintainer: LE Maintainer <le-maintainer@c3sl.ufpr.br>
Description: Configuration scripts for Linux Educacional 5
Architecture: i386
Depends: gnome-shell
[Desktop Entry]
Type=Application
Exec=/usr/local/bin/le5-startup.sh
Hidden=false
NoDisplay=false
X-GNOME-Autostart-enabled=true
Name[pt_BR]=LE5 Startup Script
Name=LE5 Startup Script
Comment[pt_BR]=Startup script for Linux Educacional 5
Comment=Startup script for Linux Educacional 5
#!/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 le5-conf
#
# le5-conf 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.
SCRIPTSDIR=/usr/local/bin/le5-conf-scripts
detectHardware() {
MOBONAME="$(dmidecode | grep -A12 "^Base" |
grep "Product Name: " | cut -d':' -f2 | sed -e 's/^ //g')"
HARDWARE=''
case "${MOBONAME}" in
'POS-MIG31AG')
if lspci | egrep -q \
'Display controller:.+TN-502|Display controller:.+SM501'; then
HARDWARE='832008'
fi
;;
'G41M4 (MS-7592)')
if lspci | egrep -q \
'VGA compatible controller: Intel Corporation 4 Series
Chipset Integrated Graphics Controller (rev 03)'; then
HARDWARE='712010'
fi
;;
*)
HARDWARE='home'
;;
esac
}
detectHardware
for FILE in $(ls ${SCRIPTSDIR}/${HARDWARE}); do
if [ -x "${SCRIPTSDIR}/${HARDWARE}/${FILE}" ]; then
if ! "${SCRIPTSDIR}/${HARDWARE}/${FILE}"; then
echo "Error: While running the ${SCRIPTSDIR}/${HARDWARE}/${FILE}"
return 1
fi
fi
done
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