@@ -481,7 +481,6 @@ scratch_build() {
481
481
while [ " $1 " ]; do
482
482
case $1 in
483
483
-i|-u|-r|-g|-p) ;;
484
- --log) LOGBUILD=1;;
485
484
-* ) OPTS=" $OPTS $1 " ;;
486
485
* ) PKGNAME=" $PKGNAME $1 " ;;
487
486
esac
@@ -498,12 +497,7 @@ scratch_build() {
498
497
}
499
498
cd $ppath
500
499
settermtitle " Building $pkg ..."
501
- if [ " $LOGBUILD " = 1 ]; then
502
- pkgbuild $OPTS | tee $LOG_DIR /$pkg .log
503
- else
504
- pkgbuild $OPTS
505
- fi
506
- [ " $? " = 0 ] || {
500
+ pkgbuild $OPTS || {
507
501
settermtitle " Building $pkg failed."
508
502
return 1
509
503
}
@@ -520,7 +514,6 @@ scratch_install() {
520
514
-r|--reinstall) REINSTALL=1;;
521
515
-y|--yes) NOCONFIRM=1;;
522
516
-n|--no-dep) NO_DEP=1;;
523
- --log) LOGBUILD=1;;
524
517
--exclude=* ) EXOPT=$1 ;;
525
518
-* ) OPTS=" $OPTS $1 " ;;
526
519
* ) PKGNAME=" $PKGNAME $1 " ;;
@@ -542,12 +535,7 @@ scratch_install() {
542
535
else
543
536
cd $( getportpath $ii )
544
537
settermtitle " Reinstalling $ii ..."
545
- if [ " $LOGBUILD " = 1 ]; then
546
- pkgbuild $OPTS -r | tee $LOG_DIR /$ii .log
547
- else
548
- pkgbuild $OPTS -r
549
- fi
550
- [ " $? " = 0 ] || {
538
+ pkgbuild $OPTS -r || {
551
539
error=1
552
540
break
553
541
}
@@ -571,12 +559,7 @@ scratch_install() {
571
559
else
572
560
cd $( getportpath $ii )
573
561
settermtitle " Installing $ii ..."
574
- if [ " $LOGBUILD " = 1 ]; then
575
- pkgbuild $OPTS -i | tee $LOG_DIR /$ii .log
576
- else
577
- pkgbuild $OPTS -i
578
- fi
579
- [ " $? " = 0 ] || {
562
+ pkgbuild -i $OPTS || {
580
563
error=1
581
564
break
582
565
}
@@ -623,12 +606,7 @@ scratch_install() {
623
606
if portpathh=$( getportpath $int ) ; then
624
607
cd $portpathh
625
608
settermtitle " [ $count /$total ] installing $int ..."
626
- if [ " $LOGBUILD " = 1 ]; then
627
- pkgbuild $OPTS -i | tee $LOG_DIR /$int .log
628
- else
629
- pkgbuild $OPTS -i
630
- fi
631
- [ " $? " = 0 ] || {
609
+ pkgbuild -i $OPTS || {
632
610
error=1
633
611
count=$(( count - 1 ))
634
612
break
@@ -722,7 +700,6 @@ scratch_sysup() {
722
700
-i|-u|-r) ;;
723
701
-y|--yes) NOCONFIRM=1;;
724
702
-n|--no-dep) NODEP=1;;
725
- --log) LOGBUILD=1;;
726
703
--exclude=* ) EXOPT=$1 ;;
727
704
-* ) OPTS=" $OPTS $1 " ;;
728
705
esac
@@ -779,24 +756,14 @@ scratch_sysup() {
779
756
cd $( getportpath $inst )
780
757
if ! isinstalled $inst ; then
781
758
settermtitle " [ $count /$total ] Installing $inst ..."
782
- if [ " $LOGBUILD " = 1 ]; then
783
- pkgbuild $OPTS -i | tee $LOG_DIR /$inst .log
784
- else
785
- pkgbuild $OPTS -i
786
- fi
787
- [ " $? " = 0 ] || {
759
+ pkgbuild -i $OPTS || {
788
760
error=1
789
761
count=$(( count - 1 ))
790
762
break
791
763
}
792
764
else
793
765
settermtitle " [ $count /$total ] Upgrading $inst ..."
794
- if [ " $LOGBUILD " = 1 ]; then
795
- pkgbuild $OPTS -u | tee $LOG_DIR /$inst .log
796
- else
797
- pkgbuild $OPTS -u
798
- fi
799
- [ " $? " = 0 ] || {
766
+ pkgbuild -u $OPTS || {
800
767
error=1
801
768
count=$(( count - 1 ))
802
769
break
@@ -818,7 +785,6 @@ scratch_upgrade() {
818
785
-i|-r) ;;
819
786
-y|--yes) NOCONFIRM=1;;
820
787
-d|--no-dep) NO_DEP=1;;
821
- --log) LOGBUILD=1;;
822
788
--exclude=* ) EXOPT=$1 ;;
823
789
-* ) OPTS=" $OPTS $1 " ;;
824
790
* ) PKGNAME=" $PKGNAME $1 " ;;
@@ -887,24 +853,14 @@ scratch_upgrade() {
887
853
cd $( getportpath $inst )
888
854
if ! isinstalled $inst ; then
889
855
settermtitle " [ $count /$total ] Installing $inst ..."
890
- if [ " $LOGBUILD " = 1 ]; then
891
- pkgbuild $OPTS -i | tee $LOG_DIR /$inst .log
892
- else
893
- pkgbuild $OPTS -i
894
- fi
895
- [ " $? " = 0 ] || {
856
+ pkgbuild -i $OPTS || {
896
857
error=1
897
858
count=$(( count - 1 ))
898
859
break
899
860
}
900
861
else
901
862
settermtitle " [ $count /$total ] Upgrading $inst ..."
902
- if [ " $LOGBUILD " = 1 ]; then
903
- pkgbuild $OPTS -u | tee $LOG_DIR /$inst .log
904
- else
905
- pkgbuild $OPTS -u
906
- fi
907
- [ " $? " = 0 ] || {
863
+ pkgbuild -u $OPTS || {
908
864
error=1
909
865
count=$(( count - 1 ))
910
866
break
@@ -1185,13 +1141,11 @@ Options:
1185
1141
-r|--reinstall reinstall
1186
1142
-n|--no-dep skip dependencies
1187
1143
-y|--yes skip ask user permission
1188
- --log log build process
1189
1144
--exclude=* exclude dependencies, comma separated
1190
1145
1191
1146
upgrade <ports> <arg> upgrade ports (use pkgbuild arg, except '-i' & '-r')
1192
1147
-n|--no-dep skip dependencies
1193
1148
-y|--yes skip ask user permission
1194
- --log log build process
1195
1149
--exclude=* exclude dependencies, comma separated
1196
1150
1197
1151
remove <ports> <arg> remove installed ports (use pkgdel arg)
@@ -1200,15 +1154,13 @@ Options:
1200
1154
sysup <arg> full system upgrade (use pkgbuild arg, except '-i', '-r' & '-u')
1201
1155
-n|--no-dep skip dependencies
1202
1156
-y|--yes skip ask user permission
1203
- --log log build process
1204
1157
--exclude=* exclude dependencies, comma separated
1205
1158
1206
1159
deplist <ports> print all dependencies for ports
1207
1160
-q|--quick skip installed ports
1208
1161
--exclude=* exclude dependencies, comma separated
1209
1162
1210
1163
build <ports> <arg> build ports (use pkgbuild arg, except '-i', '-u', '-r', '-g', & '-p')
1211
- --log log build process
1212
1164
1213
1165
lock <ports> locking ports prevent upgrade
1214
1166
unlock <ports> unlock locked ports
@@ -1240,7 +1192,6 @@ ALIAS_FILE="/etc/scratchpkg.alias"
1240
1192
# default value from pkgbuild
1241
1193
SOURCE_DIR=" /var/cache/scratchpkg/sources"
1242
1194
PACKAGE_DIR=" /var/cache/scratchpkg/packages"
1243
- LOG_DIR=" /var/cache/scratchpkg/log"
1244
1195
COMPRESSION_MODE=" xz"
1245
1196
1246
1197
mode=$1
0 commit comments