diff options
author | Thomas Backlund <tmb@mageia.org> | 2012-05-26 15:28:33 +0000 |
---|---|---|
committer | Thomas Backlund <tmb@mageia.org> | 2012-05-26 15:28:33 +0000 |
commit | 528a1fbedeffce036154955623c370b8f47c33bd (patch) | |
tree | 0865a6d7c1939082917acf5de3b4f85ba77bd09d /trunk/tools | |
parent | 07cb265cf99918196a257585757a3c2bb175f57f (diff) | |
parent | 7eead25cd00a547753ec94f6b301c5b32968291b (diff) | |
download | draklive-config-distro/mga2.tar draklive-config-distro/mga2.tar.gz draklive-config-distro/mga2.tar.bz2 draklive-config-distro/mga2.tar.xz draklive-config-distro/mga2.zip |
new branch for mga2distro/mga2
Diffstat (limited to 'trunk/tools')
-rwxr-xr-x | trunk/tools/build_live.sh | 42 | ||||
-rwxr-xr-x | trunk/tools/compute-rpm-sizes.sh | 15 | ||||
-rwxr-xr-x | trunk/tools/install-mozilla-extension.sh | 46 | ||||
-rwxr-xr-x | trunk/tools/install-portable-mozilla.sh | 58 | ||||
-rwxr-xr-x | trunk/tools/langs-expand.pl | 6 | ||||
-rw-r--r-- | trunk/tools/live-lang | 39 | ||||
-rwxr-xr-x | trunk/tools/partition.sh | 41 | ||||
-rwxr-xr-x | trunk/tools/sync-trees.sh | 20 | ||||
-rw-r--r-- | trunk/tools/umount-live | 48 |
9 files changed, 0 insertions, 315 deletions
diff --git a/trunk/tools/build_live.sh b/trunk/tools/build_live.sh deleted file mode 100755 index 099c706..0000000 --- a/trunk/tools/build_live.sh +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/sh - -set=$(date -u +%Y%m%d%H%M) - -logdir=~/draklive-logs -mkdir -p $logdir -exec &>$logdir/draklive-$set.log - -set -x - -archs="i586" -#archs="i586 x86_64" -desktops="KDE4 GNOME" -#desktops="KDE4" -regions="europe1-americas europe2 africa-india asia-noindia" -#regions="int" -#regions="europe1-americas" - -draklive_config=$(dirname $(dirname $0)) -#draklive_config=/home/blino/live-config/ - -steps="--clean --all" -#steps="--boot --loop --master" - -draklive_cmd="sudo draklive --config-root $draklive_config" -#draklive_cmd="sudo -u draklive sudo perl -I./draklive/lib ./draklive/draklive --config-root $draklive_config" - -# clean old build sets, keeping only sets from previous day and dist (iso + lists) for all sets -find /var/lib/draklive/{chroot/*,build/*/*} -maxdepth 0 -mtime +0 -not -name dist -exec rm -rf {} \; - -start=$(date) -for arch in $archs; do - for desktop in $desktops; do - for region in $regions; do - time $draklive_cmd $steps --define arch=$arch --define desktop=$desktop --define region=$region --define set=$set - done - done -done - -echo set $set -echo $start -echo $(date) diff --git a/trunk/tools/compute-rpm-sizes.sh b/trunk/tools/compute-rpm-sizes.sh deleted file mode 100755 index 5425d3f..0000000 --- a/trunk/tools/compute-rpm-sizes.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh - -chroot=$1 -name=$2 - -if [ -z "$chroot" ] || [ -z "$name" ]; then - echo "usage: $0 <chroot> <name>" -fi - -full=$name-full.lst -leaves=$name-leaves.lst -chroot $chroot sh -c "rpm -qa --qf '%{size} \t%{name}\n' | sort -n" > $full -chroot $chroot sh -c "urpmi_rpm-find-leaves | xargs rpm -q --qf '%{size} \t%{name}\n' | sort -n" > $leaves - -echo $full $leaves diff --git a/trunk/tools/install-mozilla-extension.sh b/trunk/tools/install-mozilla-extension.sh deleted file mode 100755 index 4bb4c3b..0000000 --- a/trunk/tools/install-mozilla-extension.sh +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/sh - -extpath=$1 -xpi=$2 - -if [ -z "$extpath" ]; then - echo "usage: $0 <mozilla extension path> [<xpi file>]" - exit 1 -fi - -xpi_dir="." -if [ -n "$xpi" ]; then - xpi_dir="`basename $xpi`.dir" - rm -rf $xpi_dir - mkdir -p $xpi_dir - unzip -q -d $xpi_dir $xpi -fi - -rdf="$xpi_dir/install.rdf" -if [ ! -f $rdf ]; then - echo "unable to find rdf file" - exit 1 -fi - -# remove leading newline from some broken rdf files (pt-PT) -perl -pi -e 's/^\r?\n// if $. == 1' $rdf - -hash="$(perl -pe 's/\r\n/\n/g' $rdf | sed -n '/.*em:id="\(.*\)"/{s//\1/p;q}')" -if [ -z "$hash" ]; then - hash="$(perl -pe 's/\r\n/\n/g' $rdf | sed -n '/.*em:id>\(.*\)<\/em:id>.*/{s//\1/p;q}')" -fi -if [ -z "$hash" ]; then - echo "Failed to find plugin hash." - exit 1 -fi - -echo "installing $hash in $extpath" - -extdir="$extpath/$hash" -rm -rf $extdir -mkdir -p "$extdir" -cp -af $xpi_dir/* "$extdir/" - -if [ -n "$xpi" ]; then - rm -rf $xpi_dir -fi diff --git a/trunk/tools/install-portable-mozilla.sh b/trunk/tools/install-portable-mozilla.sh deleted file mode 100755 index 5158ceb..0000000 --- a/trunk/tools/install-portable-mozilla.sh +++ /dev/null @@ -1,58 +0,0 @@ -#!/bin/sh - -mozapp=$1 -mozver=$2 -download=1 - -if [ -z "$mozapp" -o -z "$mozver" ]; then - echo "usage: $0 <mozilla application> <version>" -fi - -case "$mozapp" in - firefox) - sourceforgedir="portableapps/Mozilla Firefox, Portable Ed./Mozilla Firefox, Portable Edition $mozver" - installername=FirefoxPortable - portablename=FirefoxPortable - ;; - thunderbird) - sourceforgedir="portableapps/Mozilla Thunderbird, P.E./Mozilla Thunderbird, Portable Edition $mozver" - installername=ThunderbirdPortable - portablename=ThunderbirdPortable - ;; - *) - echo "invalid application: $mozapp" - exit 1 - ;; -esac - -installer="${installername}_${mozver}_English.paf.exe" -switchlocaleurl=https://addons.mozilla.org/en-US/firefox/downloads/file/16920/locale_switcher-2.1-fx+tb.xpi -switchlocalename=$(basename $switchlocaleurl) - -if [ -n "$download" ]; then - - wget -nc "http://freefr.dl.sourceforge.net/sourceforge/$sourceforgedir/$installer" - wget -nc $switchlocaleurl/$switchlocalename -fi - -xpi_url=http://releases.mozilla.org/pub/mozilla.org/$mozapp/releases/$mozver/win32/xpi/ -xpi_dir="${mozapp}-${mozver}-xpi" -extdir="${portablename}/App/DefaultData/profile/extensions" - -if [ -n "$download" ]; then - rm -rf $xpi_dir - mkdir -p $xpi_dir - lftp -e "lcd $xpi_dir; mget -c *.xpi; quit" $xpi_url -fi - -wine $installer - -bindir=$(dirname $0) -for ext in $switchlocalename $xpi_dir/*.xpi; do - $bindir/install-mozilla-extension.sh $extdir $ext -done - -mozexe="$portablename/$portablename.exe" -#- pre-create profile data, takes a long time on USB -wine $mozexe -# FIXME: run from key? (different path) diff --git a/trunk/tools/langs-expand.pl b/trunk/tools/langs-expand.pl deleted file mode 100755 index 2d0797b..0000000 --- a/trunk/tools/langs-expand.pl +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/perl -l -use lib qw(/usr/lib/libDrakX); -use lang; -use MDK::Common; -my @langs = grep { member(lang::locale_to_main_locale($_), @ARGV) } lang::list_langs(); -print join("\n", map { lang::l2name($_) . " (" . $_ . ")" } sort(@langs)); diff --git a/trunk/tools/live-lang b/trunk/tools/live-lang deleted file mode 100644 index 6772648..0000000 --- a/trunk/tools/live-lang +++ /dev/null @@ -1,39 +0,0 @@ -#!/usr/bin/perl -# -# - -use strict; -use lib qw(/usr/lib/libDrakX); -use common; -use lang; - -my @chroot = @ARGV; - -@chroot or usage(); - -foreach my $path (@chroot) { - my %done; - my $qa = `chroot $path rpm -qa`; - my @list; - foreach my $rpm (split "\n", $qa) { - my $l; - if ($rpm =~ /locales-([^-]+)-/) { - #$l = $1 - } elsif ($rpm =~ /(?:i18n|l10n|aspell)-([^-]+)-/) { - $l = $1 - } - if ($l && $lang::langs{$l} && !$done{$l}) { - $done{$l} = 1; - push @list,@{$lang::langs{$l}}[0] - } - } - print "$path: ", join(", ", sort @list), "\n" -} - -exit; - -sub usage { - print "\nusage:\n\n\t\tlive-lang <chroot install>\n\n"; - exit -} - diff --git a/trunk/tools/partition.sh b/trunk/tools/partition.sh deleted file mode 100755 index 2637797..0000000 --- a/trunk/tools/partition.sh +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/sh - -DEVICE=$1 -LABEL=Share -if [ -z "$DEVICE" ]; then - echo "No device" - exit 1 -fi - -# FT -#END1=780 -#END2=1950 - -#END1=380 -#END2=1022 - -END1=25000 -END2=60869 - -fdisk $DEVICE <<EOF -o -n -p -1 - -$END1 -n -p -2 - -$END2 -t -1 -b -t -2 -b -w -EOF - -mkdosfs -n $LABEL ${DEVICE}1 diff --git a/trunk/tools/sync-trees.sh b/trunk/tools/sync-trees.sh deleted file mode 100755 index 8eea0f6..0000000 --- a/trunk/tools/sync-trees.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/sh - -#MEDIA=/media/non-free/release -[ -n "$1" ] && DRY_RUN=-n -DIST=/cooker/i586 -ROOT=$DIST$MEDIA -SOURCE=/live/mnt/BIG/dis/devel$ROOT -DEST=/mnt/field/dis/local$ROOT -TEST=media/main/release/media_info/UPDATING - -rsync $DRY_RUN -avP -lHz -e 'ssh -xc arcfour' --delete --delete-excluded --exclude 'debug_*/*/*' --exclude SRPMS $SOURCE/ $DEST - -if [ -e "$DEST/$TEST" ]; then - echo - echo "Warning: package upload in progress" - echo "Resync tree!" - exit 1 -fi - -exit 0 diff --git a/trunk/tools/umount-live b/trunk/tools/umount-live deleted file mode 100644 index 098c82e..0000000 --- a/trunk/tools/umount-live +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/bash -# -### BEGIN INIT INFO -# Provides: umount-live -# Default-Stop: 0 6 -# Should-Stop: $remote_fs -# Short-Description: Umounts live-system-specific mountpoints on -#halt/reboot -# Description: This service umounts live-system-specific mountpoints -#on halt/reboot. -### END INIT INFO - -mypath=$_ - -case "$1" in - *start) - ;; - *stop) - exit - ;; - *) - gprintf "Usage: %s\n" "$(basename $0) {start}" - exit 1 - ;; -esac - -roottype=`awk '$2 == "/" { print $3 }' /etc/fstab` - -if [ "$roottype" != unionfs ]; then - # disable self during first halt when installed - chkconfig --del $(basename $0) - #rm -f $mypath - exit -fi - -maybe_umount() { - eval d=\$$# - [ -e $d ] && umount $@ -} - -maybe_umount -l /live/distrib -maybe_umount -l /live/memory -maybe_umount -l /live/system -maybe_umount -l /live/media - -maybe_umount /var/lib/rpm -maybe_umount /tmp/rpm/real -maybe_umount /tmp/rpm |