Skip to content
This repository was archived by the owner on Aug 9, 2019. It is now read-only.

Commit 383fe59

Browse files
committed
Add AURTRUST option to yaourtrc to default not edit PKGBUILDs
1 parent 8b7b86f commit 383fe59

3 files changed

Lines changed: 8 additions & 1 deletion

File tree

src/lib/aur.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,7 @@ vote_package() {
189189
# give to user all info to build and install Unsupported package from AUR
190190
install_from_aur() {
191191
local cwd
192+
local trust=$AURTRUST
192193
declare -a pkginfo=($(pkgquery -1Aif "%n %i %v %w %o %u %m %l %L" "$1"))
193194
[[ "${pkginfo[1]#-}" ]] || return 1
194195
in_array ${pkginfo[0]} "${AUR_INSTALLED_PKGS[@]}" && return 0
@@ -206,7 +207,7 @@ install_from_aur() {
206207
echo -e "$CBLINK$CRED$(gettext '( Unsupported package: Potentially dangerous ! )')$C0"
207208

208209
# Build, install/export
209-
package_loop ${pkginfo[0]} 0 || manage_error ${pkginfo[0]} ||
210+
package_loop ${pkginfo[0]} $trust || manage_error ${pkginfo[0]} ||
210211
{ cd "$cwd"; return 1; }
211212
cd "$cwd"
212213
rm -rf "$YAOURTTMPDIR/aur-${pkginfo[0]}"

src/man/yaourtrc.5

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,11 @@ If set to 0, don\(cqt check the vote status for inclusion/keeping in [community]
183183
.RS 4
184184
If set to 1, clone the AUR git repository instead of using snapshot tarballs.
185185
.RE
186+
.PP
187+
\fBAURTRUST=0\fR
188+
.RS 4
189+
If set to 1, the default answer for the prompt to edit PKGBUILDs and .install files is set to N.
190+
.RE
186191
.SH "BUILD OPTIONS"
187192
.PP
188193
\fBEXPORT=0\fR

src/yaourtrc.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
#AURUPGRADE=0
3030
#AURVOTE=1
3131
#AURUSEGIT=0
32+
#AURTRUST=0
3233

3334
# Build
3435
#EXPORT=0 # Export to 1: EXPORTDIR or PKGDEST

0 commit comments

Comments
 (0)