Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
taste-setup
Commits
5c3614aa
Commit
5c3614aa
authored
Jun 30, 2017
by
Thanassis Tsiodras
Browse files
Installing and updating component library.
parent
e9a42853
Changes
1
Hide whitespace changes
Inline
Side-by-side
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
Supports
Markdown
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