mirror of
https://github.com/outbackdingo/scratchpkg.git
synced 2026-03-21 21:44:41 +00:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b72816f8df |
@@ -15,7 +15,6 @@ install -d ${DESTDIR}${REVDEPD}
|
|||||||
install -dm777 ${DESTDIR}${CACHE_DIR}/packages
|
install -dm777 ${DESTDIR}${CACHE_DIR}/packages
|
||||||
install -dm777 ${DESTDIR}${CACHE_DIR}/sources
|
install -dm777 ${DESTDIR}${CACHE_DIR}/sources
|
||||||
install -dm777 ${DESTDIR}${CACHE_DIR}/work
|
install -dm777 ${DESTDIR}${CACHE_DIR}/work
|
||||||
install -dm777 ${DESTDIR}${CACHE_DIR}/log
|
|
||||||
|
|
||||||
install -m755 xchroot revdep pkgadd pkgdel pkgbuild pkgquery scratch updateconf ${DESTDIR}${BINDIR}
|
install -m755 xchroot revdep pkgadd pkgdel pkgbuild pkgquery scratch updateconf ${DESTDIR}${BINDIR}
|
||||||
install -m644 scratchpkg.conf scratchpkg.repo scratchpkg.alias ${DESTDIR}${CONFDIR}
|
install -m644 scratchpkg.conf scratchpkg.repo scratchpkg.alias ${DESTDIR}${CONFDIR}
|
||||||
|
|||||||
65
scratch
65
scratch
@@ -481,7 +481,6 @@ scratch_build() {
|
|||||||
while [ "$1" ]; do
|
while [ "$1" ]; do
|
||||||
case $1 in
|
case $1 in
|
||||||
-i|-u|-r|-g|-p) ;;
|
-i|-u|-r|-g|-p) ;;
|
||||||
--log) LOGBUILD=1;;
|
|
||||||
-*) OPTS="$OPTS $1";;
|
-*) OPTS="$OPTS $1";;
|
||||||
*) PKGNAME="$PKGNAME $1";;
|
*) PKGNAME="$PKGNAME $1";;
|
||||||
esac
|
esac
|
||||||
@@ -498,12 +497,7 @@ scratch_build() {
|
|||||||
}
|
}
|
||||||
cd $ppath
|
cd $ppath
|
||||||
settermtitle "Building $pkg..."
|
settermtitle "Building $pkg..."
|
||||||
if [ "$LOGBUILD" = 1 ]; then
|
pkgbuild $OPTS || {
|
||||||
pkgbuild $OPTS | tee $LOG_DIR/$pkg.log
|
|
||||||
else
|
|
||||||
pkgbuild $OPTS
|
|
||||||
fi
|
|
||||||
[ "$?" = 0 ] || {
|
|
||||||
settermtitle "Building $pkg failed."
|
settermtitle "Building $pkg failed."
|
||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
@@ -520,7 +514,6 @@ scratch_install() {
|
|||||||
-r|--reinstall) REINSTALL=1;;
|
-r|--reinstall) REINSTALL=1;;
|
||||||
-y|--yes) NOCONFIRM=1;;
|
-y|--yes) NOCONFIRM=1;;
|
||||||
-n|--no-dep) NO_DEP=1;;
|
-n|--no-dep) NO_DEP=1;;
|
||||||
--log) LOGBUILD=1;;
|
|
||||||
--exclude=*) EXOPT=$1;;
|
--exclude=*) EXOPT=$1;;
|
||||||
-*) OPTS="$OPTS $1";;
|
-*) OPTS="$OPTS $1";;
|
||||||
*) PKGNAME="$PKGNAME $1";;
|
*) PKGNAME="$PKGNAME $1";;
|
||||||
@@ -542,12 +535,7 @@ scratch_install() {
|
|||||||
else
|
else
|
||||||
cd $(getportpath $ii)
|
cd $(getportpath $ii)
|
||||||
settermtitle "Reinstalling $ii..."
|
settermtitle "Reinstalling $ii..."
|
||||||
if [ "$LOGBUILD" = 1 ]; then
|
pkgbuild $OPTS -r || {
|
||||||
pkgbuild $OPTS -r | tee $LOG_DIR/$ii.log
|
|
||||||
else
|
|
||||||
pkgbuild $OPTS -r
|
|
||||||
fi
|
|
||||||
[ "$?" = 0 ] || {
|
|
||||||
error=1
|
error=1
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
@@ -571,12 +559,7 @@ scratch_install() {
|
|||||||
else
|
else
|
||||||
cd $(getportpath $ii)
|
cd $(getportpath $ii)
|
||||||
settermtitle "Installing $ii..."
|
settermtitle "Installing $ii..."
|
||||||
if [ "$LOGBUILD" = 1 ]; then
|
pkgbuild -i $OPTS || {
|
||||||
pkgbuild $OPTS -i | tee $LOG_DIR/$ii.log
|
|
||||||
else
|
|
||||||
pkgbuild $OPTS -i
|
|
||||||
fi
|
|
||||||
[ "$?" = 0 ] || {
|
|
||||||
error=1
|
error=1
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
@@ -623,12 +606,7 @@ scratch_install() {
|
|||||||
if portpathh=$(getportpath $int); then
|
if portpathh=$(getportpath $int); then
|
||||||
cd $portpathh
|
cd $portpathh
|
||||||
settermtitle "[ $count/$total ] installing $int..."
|
settermtitle "[ $count/$total ] installing $int..."
|
||||||
if [ "$LOGBUILD" = 1 ]; then
|
pkgbuild -i $OPTS || {
|
||||||
pkgbuild $OPTS -i | tee $LOG_DIR/$int.log
|
|
||||||
else
|
|
||||||
pkgbuild $OPTS -i
|
|
||||||
fi
|
|
||||||
[ "$?" = 0 ] || {
|
|
||||||
error=1
|
error=1
|
||||||
count=$(( count - 1 ))
|
count=$(( count - 1 ))
|
||||||
break
|
break
|
||||||
@@ -722,7 +700,6 @@ scratch_sysup() {
|
|||||||
-i|-u|-r) ;;
|
-i|-u|-r) ;;
|
||||||
-y|--yes) NOCONFIRM=1;;
|
-y|--yes) NOCONFIRM=1;;
|
||||||
-n|--no-dep) NODEP=1;;
|
-n|--no-dep) NODEP=1;;
|
||||||
--log) LOGBUILD=1;;
|
|
||||||
--exclude=*) EXOPT=$1;;
|
--exclude=*) EXOPT=$1;;
|
||||||
-*) OPTS="$OPTS $1";;
|
-*) OPTS="$OPTS $1";;
|
||||||
esac
|
esac
|
||||||
@@ -779,24 +756,14 @@ scratch_sysup() {
|
|||||||
cd $(getportpath $inst)
|
cd $(getportpath $inst)
|
||||||
if ! isinstalled $inst; then
|
if ! isinstalled $inst; then
|
||||||
settermtitle "[ $count/$total ] Installing $inst..."
|
settermtitle "[ $count/$total ] Installing $inst..."
|
||||||
if [ "$LOGBUILD" = 1 ]; then
|
pkgbuild -i $OPTS || {
|
||||||
pkgbuild $OPTS -i | tee $LOG_DIR/$inst.log
|
|
||||||
else
|
|
||||||
pkgbuild $OPTS -i
|
|
||||||
fi
|
|
||||||
[ "$?" = 0 ] || {
|
|
||||||
error=1
|
error=1
|
||||||
count=$(( count - 1 ))
|
count=$(( count - 1 ))
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
settermtitle "[ $count/$total ] Upgrading $inst..."
|
settermtitle "[ $count/$total ] Upgrading $inst..."
|
||||||
if [ "$LOGBUILD" = 1 ]; then
|
pkgbuild -u $OPTS || {
|
||||||
pkgbuild $OPTS -u | tee $LOG_DIR/$inst.log
|
|
||||||
else
|
|
||||||
pkgbuild $OPTS-u
|
|
||||||
fi
|
|
||||||
[ "$?" = 0 ] || {
|
|
||||||
error=1
|
error=1
|
||||||
count=$(( count - 1 ))
|
count=$(( count - 1 ))
|
||||||
break
|
break
|
||||||
@@ -818,7 +785,6 @@ scratch_upgrade() {
|
|||||||
-i|-r) ;;
|
-i|-r) ;;
|
||||||
-y|--yes) NOCONFIRM=1;;
|
-y|--yes) NOCONFIRM=1;;
|
||||||
-d|--no-dep) NO_DEP=1;;
|
-d|--no-dep) NO_DEP=1;;
|
||||||
--log) LOGBUILD=1;;
|
|
||||||
--exclude=*) EXOPT=$1;;
|
--exclude=*) EXOPT=$1;;
|
||||||
-*) OPTS="$OPTS $1";;
|
-*) OPTS="$OPTS $1";;
|
||||||
*) PKGNAME="$PKGNAME $1";;
|
*) PKGNAME="$PKGNAME $1";;
|
||||||
@@ -887,24 +853,14 @@ scratch_upgrade() {
|
|||||||
cd $(getportpath $inst)
|
cd $(getportpath $inst)
|
||||||
if ! isinstalled $inst; then
|
if ! isinstalled $inst; then
|
||||||
settermtitle "[ $count/$total ] Installing $inst..."
|
settermtitle "[ $count/$total ] Installing $inst..."
|
||||||
if [ "$LOGBUILD" = 1 ]; then
|
pkgbuild -i $OPTS || {
|
||||||
pkgbuild $OPTS -i | tee $LOG_DIR/$inst.log
|
|
||||||
else
|
|
||||||
pkgbuild $OPTS -i
|
|
||||||
fi
|
|
||||||
[ "$?" = 0 ] || {
|
|
||||||
error=1
|
error=1
|
||||||
count=$(( count - 1 ))
|
count=$(( count - 1 ))
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
settermtitle "[ $count/$total ] Upgrading $inst..."
|
settermtitle "[ $count/$total ] Upgrading $inst..."
|
||||||
if [ "$LOGBUILD" = 1 ]; then
|
pkgbuild -u $OPTS || {
|
||||||
pkgbuild $OPTS -u | tee $LOG_DIR/$inst.log
|
|
||||||
else
|
|
||||||
pkgbuild $OPTS -u
|
|
||||||
fi
|
|
||||||
[ "$?" = 0 ] || {
|
|
||||||
error=1
|
error=1
|
||||||
count=$(( count - 1 ))
|
count=$(( count - 1 ))
|
||||||
break
|
break
|
||||||
@@ -1185,13 +1141,11 @@ Options:
|
|||||||
-r|--reinstall reinstall
|
-r|--reinstall reinstall
|
||||||
-n|--no-dep skip dependencies
|
-n|--no-dep skip dependencies
|
||||||
-y|--yes skip ask user permission
|
-y|--yes skip ask user permission
|
||||||
--log log build process
|
|
||||||
--exclude=* exclude dependencies, comma separated
|
--exclude=* exclude dependencies, comma separated
|
||||||
|
|
||||||
upgrade <ports> <arg> upgrade ports (use pkgbuild arg, except '-i' & '-r')
|
upgrade <ports> <arg> upgrade ports (use pkgbuild arg, except '-i' & '-r')
|
||||||
-n|--no-dep skip dependencies
|
-n|--no-dep skip dependencies
|
||||||
-y|--yes skip ask user permission
|
-y|--yes skip ask user permission
|
||||||
--log log build process
|
|
||||||
--exclude=* exclude dependencies, comma separated
|
--exclude=* exclude dependencies, comma separated
|
||||||
|
|
||||||
remove <ports> <arg> remove installed ports (use pkgdel arg)
|
remove <ports> <arg> remove installed ports (use pkgdel arg)
|
||||||
@@ -1200,7 +1154,6 @@ Options:
|
|||||||
sysup <arg> full system upgrade (use pkgbuild arg, except '-i', '-r' & '-u')
|
sysup <arg> full system upgrade (use pkgbuild arg, except '-i', '-r' & '-u')
|
||||||
-n|--no-dep skip dependencies
|
-n|--no-dep skip dependencies
|
||||||
-y|--yes skip ask user permission
|
-y|--yes skip ask user permission
|
||||||
--log log build process
|
|
||||||
--exclude=* exclude dependencies, comma separated
|
--exclude=* exclude dependencies, comma separated
|
||||||
|
|
||||||
deplist <ports> print all dependencies for ports
|
deplist <ports> print all dependencies for ports
|
||||||
@@ -1208,7 +1161,6 @@ Options:
|
|||||||
--exclude=* exclude dependencies, comma separated
|
--exclude=* exclude dependencies, comma separated
|
||||||
|
|
||||||
build <ports> <arg> build ports (use pkgbuild arg, except '-i', '-u', '-r', '-g', & '-p')
|
build <ports> <arg> build ports (use pkgbuild arg, except '-i', '-u', '-r', '-g', & '-p')
|
||||||
--log log build process
|
|
||||||
|
|
||||||
lock <ports> locking ports prevent upgrade
|
lock <ports> locking ports prevent upgrade
|
||||||
unlock <ports> unlock locked ports
|
unlock <ports> unlock locked ports
|
||||||
@@ -1240,7 +1192,6 @@ ALIAS_FILE="/etc/scratchpkg.alias"
|
|||||||
# default value from pkgbuild
|
# default value from pkgbuild
|
||||||
SOURCE_DIR="/var/cache/scratchpkg/sources"
|
SOURCE_DIR="/var/cache/scratchpkg/sources"
|
||||||
PACKAGE_DIR="/var/cache/scratchpkg/packages"
|
PACKAGE_DIR="/var/cache/scratchpkg/packages"
|
||||||
LOG_DIR="/var/cache/scratchpkg/log"
|
|
||||||
COMPRESSION_MODE="xz"
|
COMPRESSION_MODE="xz"
|
||||||
|
|
||||||
mode=$1
|
mode=$1
|
||||||
|
|||||||
Reference in New Issue
Block a user