mirror of
https://github.com/outbackdingo/scratchpkg.git
synced 2026-03-19 19:14:07 +00:00
updated
This commit is contained in:
8
buildpkg
8
buildpkg
@@ -75,12 +75,16 @@ getsource() {
|
||||
done
|
||||
}
|
||||
|
||||
downloadsource(){
|
||||
checkforwget() {
|
||||
|
||||
if [ ! -e /usr/bin/wget ]; then
|
||||
msgerr "Wget not installed."
|
||||
exitscript1
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
downloadsource(){
|
||||
|
||||
tarballname=$(echo $1 | rev | cut -d / -f 1 | rev)
|
||||
WGETCMD="wget --passive-ftp --no-directories --tries=3 --waitretry=3 --output-document=$SOURCE_DIR/$tarballname.partial"
|
||||
@@ -97,9 +101,11 @@ downloadsource(){
|
||||
else
|
||||
if [ -f $SOURCE_DIR/$tarballname.partial ]; then
|
||||
msg "Resuming ${color_green}$1${color_reset}."
|
||||
checkforwget
|
||||
$WGETRESUME $1 && mv $SOURCE_DIR/$tarballname.partial $SOURCE_DIR/$tarballname || exitscript1
|
||||
else
|
||||
msg "Downloading ${color_green}$1${color_reset}."
|
||||
checkforwget
|
||||
$WGETCMD $1 && mv $SOURCE_DIR/$tarballname.partial $SOURCE_DIR/$tarballname || exitscript1
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -137,8 +137,6 @@ updatesystemdb() {
|
||||
|
||||
getpkginfo() {
|
||||
|
||||
. $BUILD_SCRIPT
|
||||
|
||||
description=$(cat $BUILD_SCRIPT | grep ^'# description' | tr -d ':' | cut -d ' ' -f 3-)
|
||||
homepage=$(cat $BUILD_SCRIPT | grep ^'# homepage' | tr -d ':' | cut -d ' ' -f 3-)
|
||||
maintainer=$(cat $BUILD_SCRIPT | grep ^'# maintainer' | tr -d ':' | cut -d ' ' -f 3-)
|
||||
@@ -147,6 +145,8 @@ getpkginfo() {
|
||||
depends=$(cat $BUILD_SCRIPT | grep ^'# depends' | tr -d ':' | cut -d ' ' -f 3-)
|
||||
makedepends=$(cat $BUILD_SCRIPT | grep ^'# makedepends' | tr -d ':' | cut -d ' ' -f 3-)
|
||||
noextract=$(cat $BUILD_SCRIPT | grep ^'# noextract' | tr -d ':' | cut -d ' ' -f 3-)
|
||||
|
||||
. $BUILD_SCRIPT
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -265,13 +265,13 @@ check_directory() {
|
||||
|
||||
for dir in $INDEX_DIR $BACKUP_DIR $REJECTED_DIR; do
|
||||
if [ ! -d $dir ]; then
|
||||
msg "Directory ${color_yellow}$dir${color_reset} not exist."
|
||||
msgwarn "Directory ${color_yellow}$dir${color_reset} not exist."
|
||||
DIR_ERROR=yes
|
||||
elif [ ! -w $dir ]; then
|
||||
msg "Directory ${color_yellow}$dir${color_reset} not writable."
|
||||
msgwarn "Directory ${color_yellow}$dir${color_reset} not writable."
|
||||
DIR_ERROR=yes
|
||||
elif [ ! -x $dir ] || [ ! -r $1 ]; then
|
||||
msg "Directory ${color_yellow}$dir${color_reset} not readable."
|
||||
msgwarn "Directory ${color_yellow}$dir${color_reset} not readable."
|
||||
DIR_ERROR=yes
|
||||
fi
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user