diff --git a/Scripts/df.sh b/Scripts/df.sh new file mode 100755 index 0000000..ea18729 --- /dev/null +++ b/Scripts/df.sh @@ -0,0 +1,8 @@ +#!/bin/bash + + +df -h | grep -v "/lib/init/rw$" | grep -v "/var/run$" | grep -v "/var/lock$" | grep -v "/dev$" | grep -v "/dev/shm$" | grep -v "/lib/modules/" +df | grep -v "/lib/init/rw$" | grep -v "/var/run$" | grep -v "/var/lock$" | grep -v "/dev$" | grep -v "/dev/shm$" | grep -v "/lib/modules/" + + + diff --git a/Scripts/df.sh b/Scripts/df.sh new file mode 100755 index 0000000..ea18729 --- /dev/null +++ b/Scripts/df.sh @@ -0,0 +1,8 @@ +#!/bin/bash + + +df -h | grep -v "/lib/init/rw$" | grep -v "/var/run$" | grep -v "/var/lock$" | grep -v "/dev$" | grep -v "/dev/shm$" | grep -v "/lib/modules/" +df | grep -v "/lib/init/rw$" | grep -v "/var/run$" | grep -v "/var/lock$" | grep -v "/dev$" | grep -v "/dev/shm$" | grep -v "/lib/modules/" + + + diff --git a/Scripts/jpg2pdf.sh b/Scripts/jpg2pdf.sh new file mode 100755 index 0000000..5e3ac44 --- /dev/null +++ b/Scripts/jpg2pdf.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +for file in $* +do + # find . -name "$file" + file=`dirname $file`/`basename $file .jpg` + # file=`basename $file .jpg` + jpegtopnm $file.jpg | pnmtops -noturn | ps2pdf13 - $file.pdf + # rm $file.jpg +done + + diff --git a/Scripts/df.sh b/Scripts/df.sh new file mode 100755 index 0000000..ea18729 --- /dev/null +++ b/Scripts/df.sh @@ -0,0 +1,8 @@ +#!/bin/bash + + +df -h | grep -v "/lib/init/rw$" | grep -v "/var/run$" | grep -v "/var/lock$" | grep -v "/dev$" | grep -v "/dev/shm$" | grep -v "/lib/modules/" +df | grep -v "/lib/init/rw$" | grep -v "/var/run$" | grep -v "/var/lock$" | grep -v "/dev$" | grep -v "/dev/shm$" | grep -v "/lib/modules/" + + + diff --git a/Scripts/jpg2pdf.sh b/Scripts/jpg2pdf.sh new file mode 100755 index 0000000..5e3ac44 --- /dev/null +++ b/Scripts/jpg2pdf.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +for file in $* +do + # find . -name "$file" + file=`dirname $file`/`basename $file .jpg` + # file=`basename $file .jpg` + jpegtopnm $file.jpg | pnmtops -noturn | ps2pdf13 - $file.pdf + # rm $file.jpg +done + + diff --git a/Scripts/setup_mounts.sh b/Scripts/setup_mounts.sh new file mode 100755 index 0000000..1f4d869 --- /dev/null +++ b/Scripts/setup_mounts.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +if [ ! "$UID" = "0" ] +then + echo "This script requires being run as root, eg: \$ sudo $0" + exit +fi + +if [ -d /media/windows ] +then + echo "Bailing out early. The mount appears to already exist" + exit +fi + +mkdir -p /media/windows + +cat >> /etc/fstab << EOF +# /media/windows was on /dev/sda2 during installation +UUID=496D-6075 /media/windows vfat rw,nosuid,nodev,quiet,shortname=mixed,utf8,umask=011,gid=1000,uid=1000 0 1 +EOF + + + diff --git a/Scripts/df.sh b/Scripts/df.sh new file mode 100755 index 0000000..ea18729 --- /dev/null +++ b/Scripts/df.sh @@ -0,0 +1,8 @@ +#!/bin/bash + + +df -h | grep -v "/lib/init/rw$" | grep -v "/var/run$" | grep -v "/var/lock$" | grep -v "/dev$" | grep -v "/dev/shm$" | grep -v "/lib/modules/" +df | grep -v "/lib/init/rw$" | grep -v "/var/run$" | grep -v "/var/lock$" | grep -v "/dev$" | grep -v "/dev/shm$" | grep -v "/lib/modules/" + + + diff --git a/Scripts/jpg2pdf.sh b/Scripts/jpg2pdf.sh new file mode 100755 index 0000000..5e3ac44 --- /dev/null +++ b/Scripts/jpg2pdf.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +for file in $* +do + # find . -name "$file" + file=`dirname $file`/`basename $file .jpg` + # file=`basename $file .jpg` + jpegtopnm $file.jpg | pnmtops -noturn | ps2pdf13 - $file.pdf + # rm $file.jpg +done + + diff --git a/Scripts/setup_mounts.sh b/Scripts/setup_mounts.sh new file mode 100755 index 0000000..1f4d869 --- /dev/null +++ b/Scripts/setup_mounts.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +if [ ! "$UID" = "0" ] +then + echo "This script requires being run as root, eg: \$ sudo $0" + exit +fi + +if [ -d /media/windows ] +then + echo "Bailing out early. The mount appears to already exist" + exit +fi + +mkdir -p /media/windows + +cat >> /etc/fstab << EOF +# /media/windows was on /dev/sda2 during installation +UUID=496D-6075 /media/windows vfat rw,nosuid,nodev,quiet,shortname=mixed,utf8,umask=011,gid=1000,uid=1000 0 1 +EOF + + + diff --git a/Scripts/setup_ubuntu.sh b/Scripts/setup_ubuntu.sh new file mode 100755 index 0000000..395f42c --- /dev/null +++ b/Scripts/setup_ubuntu.sh @@ -0,0 +1,113 @@ +#!/bin/bash + +APT_MIRROR_IP=192.168.0.3 + +if [ ! "$UID" = "0" ] +then + echo "This script requires being run as root, eg: \$ sudo $0" + exit +fi + +# Modifying /etc/hosts to point to the mirror machines IP on the local network +if [ `grep -c "apt-mirror" /etc/hosts` == '0' ] +then + echo -e "\n$APT_MIRROR_IP apt-mirror" >> /etc/hosts +fi + +cat > /etc/apt/sources.list << EOF +#deb cdrom:[Ubuntu 9.04 _Jaunty Jackalope_ - Release i386 (20090420.1)]/ jaunty main restricted +# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to +# newer versions of the distribution. + +# Intrepid (8.10) +# deb http://apt-mirror/ubuntu/mirror/archive.ubuntu.com/ubuntu intrepid main restricted universe multiverse +# deb http://apt-mirror/ubuntu/mirror/archive.ubuntu.com/ubuntu intrepid-updates main restricted universe multiverse +# deb http://apt-mirror/ubuntu/mirror/archive.ubuntu.com/ubuntu intrepid-security main restricted universe multiverse +# deb-src http://apt-mirror/ubuntu/mirror/archive.ubuntu.com/ubuntu intrepid main restricted universe multiverse +# deb-src http://apt-mirror/ubuntu/mirror/archive.ubuntu.com/ubuntu intrepid-updates main restricted universe multiverse +# deb-src http://apt-mirror/ubuntu/mirror/archive.ubuntu.com/ubuntu intrepid-security main restricted universe multiverse + +# Jaunty (9.04) +deb http://apt-mirror/ubuntu/mirror/archive.ubuntu.com/ubuntu jaunty main restricted universe multiverse +deb http://apt-mirror/ubuntu/mirror/archive.ubuntu.com/ubuntu jaunty-updates main restricted universe multiverse +deb http://apt-mirror/ubuntu/mirror/archive.ubuntu.com/ubuntu jaunty-security main restricted universe multiverse +deb-src http://apt-mirror/ubuntu/mirror/archive.ubuntu.com/ubuntu jaunty main restricted universe multiverse +deb-src http://apt-mirror/ubuntu/mirror/archive.ubuntu.com/ubuntu jaunty-updates main restricted universe multiverse +deb-src http://apt-mirror/ubuntu/mirror/archive.ubuntu.com/ubuntu jaunty-security main restricted universe multiverse + +## Uncomment the following two lines to add software from the 'backports' +## repository. +## N.B. software from this repository may not have been tested as +## extensively as that contained in the main release, although it includes +## newer versions of some applications which may provide useful features. +## Also, please note that software in backports WILL NOT receive any review +## or updates from the Ubuntu security team. +# deb http://cn.archive.ubuntu.com/ubuntu/ jaunty-backports main restricted universe multiverse +# deb-src http://cn.archive.ubuntu.com/ubuntu/ jaunty-backports main restricted universe multiverse + +## Uncomment the following two lines to add software from Canonical's +## 'partner' repository. +## This software is not part of Ubuntu, but is offered by Canonical and the +## respective vendors as a service to Ubuntu users. +# deb http://archive.canonical.com/ubuntu jaunty partner +# deb-src http://archive.canonical.com/ubuntu jaunty partner + +# For XBMC (XBox Media Center) +deb http://ppa.launchpad.net/team-xbmc/jaunty-ppa/ubuntu jaunty main +deb-src http://ppa.launchpad.net/team-xbmc/jaunty-ppa/ubuntu jaunty main + +## For TOR (The Onion Router) +deb http://mirror.noreply.org/pub/tor intrepid main +deb-src http://mirror.noreply.org/pub/tor intrepid main + +# X-Server with bug fix for maximize slowness +deb http://ppa.launchpad.net/ubuntu-x-swat/xserver-no-backfill/ubuntu jaunty main +deb-src http://ppa.launchpad.net/ubuntu-x-swat/xserver-no-backfill/ubuntu jaunty main + +# VLC with bug fix for opening media in 2nd window +deb http://ppa.launchpad.net/kow/ppa/ubuntu jaunty main +deb-src http://ppa.launchpad.net/kow/ppa/ubuntu jaunty main + +EOF + +apt-get update + +# If have ATI graphics card +apt-get install xorg-driver-fglrx-dev xorg-driver-fglrx fglrx-amdcccle fglrx-kernel-source + +# Installing ATI drivers manually: +# download https://www2.ati.com/drivers/linux/ati-driver-installer-9-4-x86.x86_64.run +# apt-get install build-essential cdbs fakeroot dh-make debhelper debconf libstdc++5 dkms +# sh ati-driver-installer-9-4-x86.x86_64.run --buildpkg Ubuntu/jaunty +# dpkg -i xorg-driver-fglrx_*.deb fglrx-kernel-source_*.deb fglrx-amdcccle_*.deb + +# Optional +apt-get install openssh-server amule + +# Utility +apt-get install gscan2pdf +apt-get install pdftk + +# Media related +apt-get install compizconfig-settings-manager +apt-get install epiphany-browser mozilla-thunderbird vlc flashplugin-installer miro foxyproxy +apt-get install xbmc +apt-get install tor +apt-get install ubuntu-restricted-extras lame grip ardour audacity + +# Other packages +if [ -d /media/windows/Linux/General ] +then + find /media/windows/Linux/General -name "*.deb" | while read deb_file + do + package=`dpkg --info $deb_file | grep "Package:" | cut -d ' ' -f 3` + state=`aptitude show $package | grep "State:" | cut -d ' ' -f 2` + echo "$package is $state." + if [ ! $state == "installed" ] + then + dpkg --install $deb_file + fi + done +fi + +