Make installer work with FAKE_AS_ROOT=no.
This commit is contained in:
parent
c3fe54d9e9
commit
c118880300
@ -1,4 +1,4 @@
|
|||||||
$OpenBSD: patch-installer_tcl,v 1.4 2014/09/01 03:15:22 stu Exp $
|
$OpenBSD: patch-installer_tcl,v 1.5 2014/09/10 23:09:31 stu Exp $
|
||||||
|
|
||||||
Install everything nicely.
|
Install everything nicely.
|
||||||
Generate tcllib.n.
|
Generate tcllib.n.
|
||||||
@ -14,7 +14,7 @@ Generate tcllib.n.
|
|||||||
+ }
|
+ }
|
||||||
+ log "Installing $src to $dest"
|
+ log "Installing $src to $dest"
|
||||||
run file copy -force $src $dest
|
run file copy -force $src $dest
|
||||||
+ file attributes $dest -owner root -group bin -permissions 0o444
|
+ file attributes $dest -permissions 0o444
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -22,7 +22,7 @@ Generate tcllib.n.
|
|||||||
+ log "Making directory $dest"
|
+ log "Making directory $dest"
|
||||||
run file mkdir $dest
|
run file mkdir $dest
|
||||||
|
|
||||||
+ file attributes $dest -owner root -group bin -permissions 0o755
|
+ file attributes $dest -permissions 0o755
|
||||||
if {[string equal $pattern *] || !$recurse} {
|
if {[string equal $pattern *] || !$recurse} {
|
||||||
foreach file [glob -nocomplain [file join $src $pattern]] {
|
foreach file [glob -nocomplain [file join $src $pattern]] {
|
||||||
set base [file tail $file]
|
set base [file tail $file]
|
||||||
@ -34,7 +34,7 @@ Generate tcllib.n.
|
|||||||
catch {file delete -force $f}
|
catch {file delete -force $f}
|
||||||
puts -nonewline [set of [open $f w]] $text
|
puts -nonewline [set of [open $f w]] $text
|
||||||
close $of
|
close $of
|
||||||
+ file attributes $f -owner root -group bin -permissions 0o444
|
+ file attributes $f -permissions 0o444
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -58,7 +58,7 @@ Generate tcllib.n.
|
|||||||
+ if {![file exists $config(app,path)]} {
|
+ if {![file exists $config(app,path)]} {
|
||||||
+ log "Making directory $config(app,path)"
|
+ log "Making directory $config(app,path)"
|
||||||
+ run file mkdir $config(app,path)
|
+ run file mkdir $config(app,path)
|
||||||
+ file attributes $config(app,path) -owner root -group bin -permissions 0o755
|
+ file attributes $config(app,path) -permissions 0o755
|
||||||
}
|
}
|
||||||
+ _exafile $aexe $adst $config(tclsh)
|
+ _exafile $aexe $adst $config(tclsh)
|
||||||
+ if {[file exists $aexe.man]} {
|
+ if {[file exists $aexe.man]} {
|
||||||
@ -141,7 +141,7 @@ Generate tcllib.n.
|
|||||||
+ set f [open $fn w]
|
+ set f [open $fn w]
|
||||||
+ puts -nonewline $f [[::doctools::new mp -format nroff] format $mp]
|
+ puts -nonewline $f [[::doctools::new mp -format nroff] format $mp]
|
||||||
+ close $f
|
+ close $f
|
||||||
+ file attributes $fn -owner root -group bin -permissions 0o444
|
+ file attributes $fn -permissions 0o444
|
||||||
}
|
}
|
||||||
|
|
||||||
# --------------------------------------------------------------
|
# --------------------------------------------------------------
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
$OpenBSD: patch-support_installation_actions_tcl,v 1.4 2014/09/01 03:15:22 stu Exp $
|
$OpenBSD: patch-support_installation_actions_tcl,v 1.5 2014/09/10 23:09:31 stu Exp $
|
||||||
|
|
||||||
Retrieve module info from man pages.
|
Retrieve module info from man pages.
|
||||||
Perform shebang adjustments.
|
Perform shebang adjustments.
|
||||||
@ -24,7 +24,7 @@ Perform shebang adjustments.
|
|||||||
+ set f [open $dfn w]
|
+ set f [open $dfn w]
|
||||||
+ puts -nonewline $f $d
|
+ puts -nonewline $f $d
|
||||||
+ close $f
|
+ close $f
|
||||||
+ file attributes $dfn -owner root -group bin -permissions 0o444
|
+ file attributes $dfn -permissions 0o444
|
||||||
+}
|
+}
|
||||||
|
|
||||||
-proc _exa {module exadir} {
|
-proc _exa {module exadir} {
|
||||||
@ -97,7 +97,7 @@ Perform shebang adjustments.
|
|||||||
+ } {
|
+ } {
|
||||||
+ set perms 0o444
|
+ set perms 0o444
|
||||||
+ }
|
+ }
|
||||||
+ file attributes $dfn -owner root -group bin -permissions $perms
|
+ file attributes $dfn -permissions $perms
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
+proc _exa {module srcdir dstdir tclsh} {
|
+proc _exa {module srcdir dstdir tclsh} {
|
||||||
@ -109,7 +109,7 @@ Perform shebang adjustments.
|
|||||||
+ if {![file exists $dstdir]} {
|
+ if {![file exists $dstdir]} {
|
||||||
+ log "Making directory $dstdir"
|
+ log "Making directory $dstdir"
|
||||||
+ file mkdir $dstdir
|
+ file mkdir $dstdir
|
||||||
+ file attributes $dstdir -owner root -group bin -permissions 0o755
|
+ file attributes $dstdir -permissions 0o755
|
||||||
+ }
|
+ }
|
||||||
+ foreach fn [glob -nocomplain -dir [file join $srcdir $actual] *] {
|
+ foreach fn [glob -nocomplain -dir [file join $srcdir $actual] *] {
|
||||||
+ if {[file isdirectory $fn]} {
|
+ if {[file isdirectory $fn]} {
|
||||||
|
Loading…
Reference in New Issue
Block a user