Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
nucleo
Manage
Activity
Members
Labels
Plan
Issues
4
Issue boards
Milestones
Wiki
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
blockchain
nucleo
Commits
15f24023
Commit
15f24023
authored
5 years ago
by
Robert Martin-Legene
Browse files
Options
Downloads
Patches
Plain Diff
Instalar solamente paquetes si no estan. runasownerof ahora hace "cd" tambien.
parent
49e3eee1
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bin/bfaupdate.sh
+19
-1
19 additions, 1 deletion
bin/bfaupdate.sh
with
19 additions
and
1 deletion
bin/bfaupdate.sh
+
19
−
1
View file @
15f24023
...
...
@@ -16,13 +16,29 @@ function runasownerof
path
=
$1
precmd
=
shift
1
pushd
$path
>
/dev/null
if
[
$(
stat
--format
=
%u
$path
)
-ne
$UID
]
then
precmd
=
"sudo -u
$(
stat
--format
=
%U
$path
)
"
fi
unset
path
${
precmd
}
"
$@
"
rv
=
$?
popd
>
/dev/null
unset
precmd
return
$rv
}
function
aptinstall
{
for
pkg
in
$*
do
dpkg
--verify
$pkg
2>/dev/null
||
(
info
"Installing
$pkg
"
runasownerof / apt
-y
install
$pkg
)
done
}
set
-x
...
...
@@ -39,6 +55,8 @@ then
runasownerof
${
BFAHOME
}
git pull
exec
$0
wealreadypulled
else
runasownerof / apt
-y
install
libclass-accessor-perl
aptinstall libclass-accessor-perl
# make sure bfa is in group sudo
id
bfa |
grep
-q
sudo
||
runasownerof / adduser bfa
sudo
runasownerof
${
BFAHOME
}
npm rebuild
fi
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment