Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
taste-setup
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
2
Issues
2
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
TASTE
taste-setup
Commits
5c3614aa
Commit
5c3614aa
authored
Jun 30, 2017
by
Thanassis Tsiodras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Installing and updating component library.
parent
e9a42853
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
0 deletions
+35
-0
install/95_components_library.sh
install/95_components_library.sh
+35
-0
No files found.
install/95_components_library.sh
0 → 100755
View file @
5c3614aa
#!/bin/bash
DIR
=
"
$(
cd
"
$(
dirname
"
${
BASH_SOURCE
[0]
}
"
)
"
&&
pwd
)
"
.
${
DIR
}
/common.sh
# Fetch and install latest ASN1SCC release
LIBDIR
=
${
PREFIX
}
/share/components_library
mkdir
-p
${
LIBDIR
}
||
exit
1
getver
()
{
grep
TASTE_IV_Properties::Version
"
$@
"
|
head
-1
|
\
awk
-F
\"
'{print $(NF-1)}'
}
cd
"
${
DIR
}
"
/../components_library
||
exit
1
for
i
in
*
;
do
# Only check folders (the components folder has files, too)
cd
"
${
DIR
}
"
/../components_library
||
exit
1
[
!
-d
"
$i
"
]
&&
continue
# Is it already installed?
if
[
!
-d
${
LIBDIR
}
/
"
$i
"
]
;
then
# No, install component in library
echo
"[-] Installing
$i
in component library..."
cp
-a
"
$i
"
${
LIBDIR
}
||
exit
1
else
# Yes, it is - check for updates
cd
"
${
DIR
}
"
/../components_library/
"
$i
"
||
exit
1
NEWVER
=
$(
getver
*
aadl
)
cd
${
LIBDIR
}
/
"
$i
"
||
exit
1
OLDVER
=
$(
getver
*
aadl
)
if
[
"
${
OLDVER
}
"
!=
"
${
NEWVER
}
"
]
;
then
echo
"[-] Updating
$i
in component library..."
cp
-a
"
${
DIR
}
"
/../components_library/
"
$i
"
/
*
.
fi
fi
done
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment