Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 81798 Details for
Bug 125595
gentoolkit: Helper scripts to download packages for internet impaired hosts
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
main script
emerge-zip (text/plain), 1.72 KB, created by
Diether Knof
on 2006-03-09 13:33:31 UTC
(
hide
)
Description:
main script
Filename:
MIME Type:
Creator:
Diether Knof
Created:
2006-03-09 13:33:31 UTC
Size:
1.72 KB
patch
obsolete
>#!/bin/bash > ># media to mount >MEDIA=/media/usbstick ># directory to save the file list to >DIR=${MEDIA}/portage ># directory with the distfiles >DISTFILES_DIR=/usr/portage/distfiles ># directory with the script filesj >SCRIPTS_DIR=~/bin > ># mount the media >mount ${MEDIA} 2>/dev/null >mkdir -p ${DIR}/distfiles > ># check for write access >touch ${DIR}/distfiles/Files \ >|| ( echo "cannot touch '${DIR}/distfiles/Files'"; \ > echo "make sure that '${DIR}/distfiles' is a directory";\ > echo "exiting"; \ > false ) || exit > > ># echo the prompt >echo "emerge-zip $@" > ># save the packages and the command >echo "$@" >> ${DIR}/packages >echo "echo emerge -a $@ && emerge -a $@" >> ${DIR}/install > ># Checks whether the files exists in the local distfiles directory ># If not, then the internet addresses are added to the 'Files' file ># params: internet addresses of the files >function check_for_files() { > if [ -f ${DISTFILES_DIR}/$(basename $1) ]; then return; fi > # print the parameters at one line each > for f in $@; do echo $f; done >} # function check_for_files() > ># Create the list of files to be downloaded. ># Then split the emerge output into lines and for each line (= file) check ># whether the file is already on the system. Else save the file in 'Files' >emerge -fp "$@" 2>&1 >/dev/null \ >| grep -v "^$" \ >| while read line; do > check_for_files $line > done \ > >> ${DIR}/Files > ># copy the fetch and move scripts >cp ${SCRIPTS_DIR}/emerge-zip ${DIR}/ >cp ${SCRIPTS_DIR}/fetch-files ${DIR}/ >cp ${SCRIPTS_DIR}/move-files ${DIR}/ > ># print some statistics >echo -n "'Files' has $(wc -l < ${DIR}/Files) lines, " >echo -n "$(sort -u ${DIR}/Files | wc -l) locations " >echo "and $(for f in `sort -u ${DIR}/Files`; do basename $f; done | sort -u | wc -l) files." >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 125595
: 81798 |
81799
|
81800