trisquelize.sh 4.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. #!/bin/bash
  2. #
  3. # Copyright (C) 2010 Rubén Rodríguez <ruben@trisquel.info>
  4. #
  5. # This program is free software; you can redistribute it and/or modify
  6. # it under the terms of the GNU General Public License as published by
  7. # the Free Software Foundation; either version 2 of the License, or
  8. # (at your option) any later version.
  9. #
  10. # This program is distributed in the hope that it will be useful,
  11. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. # GNU General Public License for more details.
  14. #
  15. # You should have received a copy of the GNU General Public License
  16. # along with this program; if not, write to the Free Software
  17. # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  18. #
  19. if ! touch /etc/apt/sources.list 2>/dev/null
  20. then
  21. echo You need to run this script with sudo!
  22. echo Try: sudo sh $0
  23. fi
  24. # Edit these lines if you want to use a different mirror, release or edition.
  25. # Available editions are trisquel and trisquel-mini
  26. MIRROR="http://es.archive.trisquel.info/trisquel/"
  27. RELEASE="flidas"
  28. EDITION="trisquel"
  29. cp /etc/apt/sources.list /etc/apt/sources.list.ubuntu-orig
  30. cat << EOF > /etc/apt/sources.list
  31. deb $MIRROR $RELEASE main
  32. deb $MIRROR $RELEASE-security main
  33. deb $MIRROR $RELEASE-updates main
  34. #deb $MIRROR $RELEASE-backports main
  35. deb-src $MIRROR $RELEASE main
  36. deb-src $MIRROR $RELEASE-security main
  37. deb-src $MIRROR $RELEASE-updates main
  38. #deb $MIRROR $RELEASE-backports main
  39. EOF
  40. sed -i 's/\(.*\)/#\1/' /etc/apt/sources.list.d/*
  41. cat << EOF > /etc/apt/preferences.d/pinning
  42. Package: *
  43. Pin: release o=Trisquel
  44. Pin-Priority: 1001
  45. EOF
  46. export DEBIAN_FRONTEND=noninteractive
  47. apt-get update 2>&1 | COLUMNS=500 tee /var/log/trisquelize.log
  48. apt-get -y --force-yes install trisquel-keyring 2>&1 | COLUMNS=500 tee -a /var/log/trisquelize.log
  49. apt-key add /var/lib/apt/keyrings/trisquel-archive-keyring.gpg 2>&1 | COLUMNS=500 tee -a /var/log/trisquelize.log
  50. apt-get remove --purge plymouth-theme-ubuntu 2>&1 | COLUMNS=500 tee -a /var/log/trisquelize.log
  51. apt-get remove --purge plymouth-theme-ubuntu-text 2>&1 | COLUMNS=500 tee -a /var/log/trisquelize.log
  52. apt-get -y --force-yes dist-upgrade 2>&1 | COLUMNS=500 tee -a /var/log/trisquelize.log
  53. apt-get install -y --force-yes --no-install-recommends $EDITION $EDITION-recommended 2>&1 | COLUMNS=500 tee -a /var/log/trisquelize.log
  54. apt-get install -y --force-yes --no-install-recommends linux-image-generic 2>&1 | COLUMNS=500 tee -a /var/log/trisquelize.log
  55. rm /etc/apt/preferences.d/pinning
  56. echo -------------------------------------------
  57. echo All Trisquel packages succesfully installed.
  58. echo Your system may still have some non-free packages installed,
  59. echo I\'ll now ask you for removal, one by one.
  60. for i in aee afio app-install-data-commercial app-install-data-partner app-install-data-ubuntu b43-fwcutter capiutils chromium-browser chromium-browser-dbg chromium-browser-inspector chromium-browser-l10n chromium-codecs-ffmpeg chromium-codecs-ffmpeg-dbg chromium-codecs-ffmpeg-extra chromium-codecs-ffmpeg-extra-dbg chromium-codecs-ffmpeg-nonfree chromium-codecs-ffmpeg-nonfree-dbg d4x-common envyng-core envyng-gtk envyng-qt fglrx-modaliases firefox-3.5-branding firefox-branding flashplugin-installer freesci freesci-doc gstreamer0.10-pitfdll helix-player ipppd isdnactivecards isdneurofile isdnlog isdnlog-data isdnutils isdnutils-base isdnutils-doc isdnutils-xtools isdnvbox isdnvboxclient isdnvboxserver ivman jockey jockey-common jockey-gtk jockey-kde libmoon libmoonlight-desktop2.0-cil-dev libmoonlight-gtk3.0-cil libmoonlight-system-windows-controls2.0-cil libmoonlight-system-windows3.0-cil libmoonlight-windows-desktop3.0-cil libubuntuone libubuntuone-1.0-1 libubuntuone-dev libubuntuone1.0-cil libubuntuone1.0-cil-dev monodoc-moonlight-manual moon moonlight-plugin-core moonlight-plugin-mozilla moonlight-tools moonlight-web-devel mozilla-helix-player ndisgtk ndiswrapper ndiswrapper-common ndiswrapper-utils-1.9 nvidia-173-modaliases nvidia-180-modaliases nvidia-185-modaliases nvidia-96-modaliases nvidia-common nvidia-current-modaliases nvidia-settings ophcrack ophcrack-cli pdftk pppdcapiplugin rman scribus-ng-doc scsi-firmware linux-firmware software-center tatan ubufox ubuntu-drivers-common ubuntuone-client ubuntuone-client-gnome ubuntuone-client-tools ubuntuone-storage-protocol user-mode-linux vrms
  61. do
  62. echo WARNING: non-free package found: $i
  63. echo Do you want to remove it?
  64. apt-get remove --purge $i
  65. done
  66. echo -------------------------------------------
  67. echo System successfully Trisquelized!
  68. echo If you want to use the Trisquel default desktop layout and
  69. echo other gconf settings, run this as user:
  70. echo gconftool --recursive-unset /apps