From 2daab298f7a63cded68bde56448dffad5d0f55b5 Mon Sep 17 00:00:00 2001 From: MestreLion Date: Tue, 2 Apr 2013 12:15:12 -0300 Subject: [PATCH] delete old files --- .buildpath | 5 - .project | 17 -- reference/findsku | 16 -- reference/reposize.sh | 312 -------------------------------- runonce/skype/skype.desktop | 9 - runonce/skype/skype.desktop.bak | 9 - 6 files changed, 368 deletions(-) delete mode 100644 .buildpath delete mode 100644 .project delete mode 100644 reference/findsku delete mode 100644 reference/reposize.sh delete mode 100644 runonce/skype/skype.desktop delete mode 100644 runonce/skype/skype.desktop.bak diff --git a/.buildpath b/.buildpath deleted file mode 100644 index c45502f..0000000 --- a/.buildpath +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/.project b/.project deleted file mode 100644 index 3a09099..0000000 --- a/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - scripts - - - - - - org.eclipse.dltk.core.scriptbuilder - - - - - - net.sourceforge.shelled.core.nature - - diff --git a/reference/findsku b/reference/findsku deleted file mode 100644 index 32650da..0000000 --- a/reference/findsku +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash - -# Usage findsku -# Example: findsku 605284307892 14 ~/mydir -# Result: ./teste.edi: SKU=605284307892, QTY=14 - -sku=$1 -qty=$2 -dir=$3 - -echo "looking for SKU #${sku} with QTY=${qty} in ${dir}:" - -while read -r file; do - awk -F'*' -v sku="$sku" -v qty="$qty" 'BEGIN{RS="*UP*"} $2==sku && - $NF==qty {print FILENAME ": SKU=" sku ", QTY=" qty}' "$file" -done < <(find "$dir" -name "*.edi" -type f) diff --git a/reference/reposize.sh b/reference/reposize.sh deleted file mode 100644 index 20d69ca..0000000 --- a/reference/reposize.sh +++ /dev/null @@ -1,312 +0,0 @@ -#!/bin/bash -# -# reposize - Calculates the size of an Ubuntu or Debian repository -# -# Based on reposize.sh written by Eduardo Lago Aguilar -# . Original code retrieved in 2012-03-21 -# -# Copyright (C) 2012 Rodrigo Silva (MestreLion) -# -# This program 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 3 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, see -# -# This script computes the total size of various Debian-based repositories by -# means of downloading the Packages.gz and making a sum of the size of every -# package. Of course, there are many shared/common packages between different -# versions of the same Linux distro. So this script will compute the max -# possible size. -# -# Additionally the script saves the size for every collection of packages -# (Packages.gz) on a temporal archive, so if you run the script twice it won't -# download the Packages.gz again. - -usage() { -cat <<- USAGE - Usage: $self [options] -USAGE -if [[ "$1" ]] ; then - cat <<- USAGE - Try '$self --help' for more information. - USAGE - exit 1 -fi -cat <<-USAGE - - Calculates the size of Debian repositories, including derivatives as Ubuntu - - General Options: - -h|--help - show this page. - -v|--verbose - print more details about what is being done. - -q|--quiet - do not print download status or errors - - Cache Options: - --update - update cache by re-scanning repositories' urls - --purge - purge all cache files, forcing re-download of remote files - - Filter Options: - --distros DISTRO,[...] Distribuitions (debian,ubuntu,linuxmint) - --releases RELEASE,[...] Releases (stable,oneiric,lisa) - --components COMPONENT,[...] Components (main,contrib,universe,multiverse) - --archs ARCH,[...] Architectures (i386,amd64) - - For each filter option, if blank or ommited, all values are shown. - For archs, "binary-" will be appended to each selected arch - - Result Options: - --installed show Installed Size instead. Default is package size - --collapse GROUP collapse the given group (distro,release,component,arch), - and all its "subgroups", in a single result line. - - Examples: - $self --update --collapse arch - $self --archs i386 --installed --collapse component - $self --distros ubuntu --releases lucid,maverick --components main - - Copyright (C) 2012 Rodrigo Silva (MestreLion) - License: GPLv3 or later. See -USAGE -exit 0 -} -invalid() { echo "$self: invalid option $1" ; usage 1 ; } -missing() { echo "missing ${1:+$1 }operand" ; usage 1 ; } - -fatal() { [[ "$1" ]] && printf "%s\n" "$self: $1" >&2 ; exit "${2:-1}" ; } - -_set_group() { - case "$1" in - distro ) group=4 ;; - release ) group=3 ;; - component) group=2 ;; - arch ) group=1 ;; - ?* ) invalid "for --collapse: $1" ;; - * ) missing "collapse" - esac -} - -_show_distro(){ - (( "${#udistros[@]}" )) || return 0 - local dist - for dist in "${udistros[@]}"; do [[ "$1" == "$dist" ]] && return 0; done - return 1 -} - -_printrepo() { - printf "%'9d MiB - %s %s %s\n" $(( $1/(1024*1024) )) "$2" "$3" "$4" -} - -_get_repo_info() { - local timecond - local url="${baseurl}/dists/${1}/${2}/${3}/Packages.gz" - local cachefile="${cachedir}/${distro/\//_}_${1/\//_}_${2/\//_}_${3}.gz" - local infofile="${cachefile}.info.txt" - - # Download - { ! [[ -f "$cachefile" ]] || (( update )) ; } && { - (( quiet )) || echo "Processing $url" - [[ -f "$cachefile" ]] && timecond=( "-S" "--time-cond" "$cachefile" ) - curl -L -f -s -o "$cachefile" "${timecond[@]}" "$url" - } - - # Extract and generate info - [[ "$infofile" -nt "$cachefile" ]] || { - if [[ -f "$cachefile" ]] ; then zcat "$cachefile"; else echo ""; fi | - awk ' - BEGIN { size=0; inst=0; lblsize="Size:"; lblinst="Installed-Size:" } - $1==lblsize {size += $2} - $1==lblinst {inst += $2 * 1024} - END{ printf("%s %.0f\n",lblsize,size);printf("%s %.0f\n",lblinst,inst) } - ' > "$infofile" - } -} - -_size_for_repo() { - local infofile="$cachedir/${distro/\//_}_${1/\//_}_${2/\//_}_$3.gz.info.txt" - if (( installed )) ; then field="Installed-Size:" ; else field="Size:"; fi - awk -v "field=$field" '$1==field{printf("%.0f\n",$2)}' "$infofile" -} - -_size_for_distro() { - local distro_total=0 - local reposize=0 - local subtotal=0 - - # Download and cache loop - for rel in "${releases[@]}" ; do - for comp in "${components[@]}" ; do - for arch in "${archs[@]}" ; do - _get_repo_info "$rel" "$comp" "$arch" - done - done - done - - # Read and show loop - echo -e "\n${distro} DISTRO${instlabel} SIZE SUMMARY" - echo "====================================" - for rel in "${releases[@]}" ; do - for comp in "${components[@]}" ; do - for arch in "${archs[@]}" ; do - (( reposize = $(_size_for_repo "$rel" "$comp" "$arch") )) - (( subtotal += reposize )) - (( distro_total += reposize )) - (( group == 0 )) && { _printrepo "$subtotal" "$rel" "$comp" "$arch" ; subtotal=0 ; } - done - (( group == 1 )) && { _printrepo "$subtotal" "$rel" "$comp" ; subtotal=0 ; } - done - (( group == 2 )) && { _printrepo "$subtotal" "$rel" ; subtotal=0 ; } - done - (( total += distro_total )) - printf "%'9d MiB [%'6d GiB] - TOTAL DISTRO${instlabel} SIZE\n\n" \ - $((distro_total/(1024*1024))) \ - $((distro_total/(1024*1024*1024))) -} - -self="${0##*/}" -cachedir=${XDG_CACHE_HOME:-~/.cache}/reposize -today=$(date +'%Y%m%d') -verbose=0 -quiet=0 -update=0 -installed=0 -purge=0 -group=0 -total=0 - -instlabel= -udistros=() -ureleases=() -ucomponents=() -uarch=() - -# Loop options -while (( $# )); do - case "$1" in - -h|--help ) usage ;; - -v|--verbose ) verbose=1 ;; - -q|--quiet ) quiet=1 ;; - --update ) update=1 ;; - --installed ) installed=1 ;; - --purge ) purge=1 ;; - --collapse ) shift ; _set_group "$1" ;; - --distros ) shift ; IFS="," read -a udistros <<< "$1" ;; - --releases ) shift ; IFS="," read -a ureleases <<< "$1" ;; - --components ) shift ; IFS="," read -a ucomponents <<< "$1" ;; - --archs ) shift ; IFS="," read -a uarchs <<< "$1" ;; - * ) invalid "$1" ;; - esac - shift -done - - -# Handle user input -(( purge )) && { rm -rf "$cachedir" ; echo "$self: purged $cachedir" ; exit ; } -(( installed )) && instlabel=" INSTALLED" - -for i in "${!uarchs[@]}"; do uarchs[i]="binary-${uarchs[i]}"; done - -# Check if external tools are present -type curl >/dev/null 2>&1 || -fatal "curl not found. Install it with 'sudo apt-get install curl'" - - -mkdir -p "$cachedir" || fatal "could not create cache directory $cachedir" - -distro=ubuntu -if _show_distro "$distro"; then - baseurl=http://archive.ubuntu.com/ubuntu - if (( ${#ureleases[@]} )); then releases=("${ureleases[@]}") - else - releases=() - releases+=(lucid lucid-backports lucid-proposed lucid-security lucid-updates) - releases+=(maverick maverick-backports maverick-proposed maverick-security maverick-updates) - releases+=(natty natty-backports natty-proposed natty-security natty-updates) - releases+=(oneiric oneiric-backports oneiric-proposed oneiric-security oneiric-updates) - releases+=(precise precise-backports precise-proposed precise-security precise-updates) - fi - if (( ${#ucomponents[@]} )); then components=("${ucomponents[@]}") - else components=("main" "multiverse" "restricted" "universe") ; fi - if (( ${#uarchs[@]} )); then archs=("${uarchs[@]}") - else archs=("binary-i386" "binary-amd64") ; fi - _size_for_distro - - baseurl=http://archive.canonical.com/ubuntu - if (( ${#ureleases[@]} )); then releases=("${ureleases[@]}") - else - releases=() - releases+=(lucid) - releases+=(maverick) - releases+=(natty) - releases+=(oneiric) - releases+=(precise) - fi - if (( ${#ucomponents[@]} )); then components=("${ucomponents[@]}") - else components=("partner") ; fi - if (( ${#uarchs[@]} )); then archs=("${uarchs[@]}") - else archs=("binary-i386" "binary-amd64") ; fi - _size_for_distro -fi - -distro=debian -if _show_distro "$distro"; then - baseurl=http://ftp.debian.org/debian - if (( ${#ureleases[@]} )); then releases=("${ureleases[@]}") - else - releases=() - releases+=(stable-proposed-updates stable-updates stable) - releases+=(testing-proposed-updates testing) - releases+=(unstable) - fi - if (( ${#ucomponents[@]} )); then components=("${ucomponents[@]}") - else components=("main" "contrib" "non-free") ; fi - if (( ${#uarchs[@]} )); then archs=("${uarchs[@]}") - else archs=("binary-i386" "binary-amd64") ; fi - _size_for_distro -fi - -distro=debian-security -if _show_distro "$distro"; then - baseurl=http://security.debian.org/debian-security - if (( ${#ureleases[@]} )); then releases=("${ureleases[@]}") - else - releases=() - releases+=(stable/updates) - releases+=(testing/updates) - fi - if (( ${#ucomponents[@]} )); then components=("${ucomponents[@]}") - else components=("main" "contrib" "non-free") ; fi - if (( ${#uarchs[@]} )); then archs=("${uarchs[@]}") - else archs=("binary-i386" "binary-amd64") ; fi - _size_for_distro -fi - -distro=linuxmint -if _show_distro "$distro"; then - baseurl=http://packages.linuxmint.com - if (( ${#ureleases[@]} )); then releases=("${ureleases[@]}") - else - releases=() - releases+=(debian) - releases+=(julia) - releases+=(katya) - releases+=(lisa) - releases+=(maya) - fi - if (( ${#ucomponents[@]} )); then components=("${ucomponents[@]}") - else components=("backport" "import" "main" "romeo" "upstream") ; fi - if (( ${#uarchs[@]} )); then archs=("${uarchs[@]}") - else archs=("binary-i386" "binary-amd64") ; fi - _size_for_distro -fi - -printf "%'9d MiB [%'6d GiB] - GRAND TOTAL${instlabel} SIZE\n" \ - $((total/(1024*1024))) \ - $((total/(1024*1024*1024))) diff --git a/runonce/skype/skype.desktop b/runonce/skype/skype.desktop deleted file mode 100644 index 5d723e0..0000000 --- a/runonce/skype/skype.desktop +++ /dev/null @@ -1,9 +0,0 @@ -[Desktop Entry] -Name=Skype -Comment=Skype Internet Telephony -Exec=skype -Icon=skype -Terminal=0 -Type=Application -Encoding=UTF-8 -Categories=Network;Application; diff --git a/runonce/skype/skype.desktop.bak b/runonce/skype/skype.desktop.bak deleted file mode 100644 index c335ec5..0000000 --- a/runonce/skype/skype.desktop.bak +++ /dev/null @@ -1,9 +0,0 @@ -[Desktop Entry] -Name=Skype -Comment=Skype Internet Telephony -Exec=skype -Icon=skype.png -Terminal=0 -Type=Application -Encoding=UTF-8 -Categories=Network;Application;