summarylogtreecommitdiffstats
path: root/jlink-software-and-documentation.install
diff options
context:
space:
mode:
authorAlexis Polti2016-01-22 01:14:30 +0100
committerAlexis Polti2016-01-22 01:14:30 +0100
commit1f79409501a2b02f50218f74ed55dc0073840555 (patch)
treefe9219b26804f97dba19eab0c6415c5dbad2efe1 /jlink-software-and-documentation.install
downloadaur-1f79409501a2b02f50218f74ed55dc0073840555.tar.gz
Initial version of official Segger Jlink tools
Diffstat (limited to 'jlink-software-and-documentation.install')
-rw-r--r--jlink-software-and-documentation.install42
1 files changed, 42 insertions, 0 deletions
diff --git a/jlink-software-and-documentation.install b/jlink-software-and-documentation.install
new file mode 100644
index 000000000000..b84cb8cc1c8b
--- /dev/null
+++ b/jlink-software-and-documentation.install
@@ -0,0 +1,42 @@
+msg() {
+ # check if messages are to be printed using color
+ unset ALL_OFF BOLD BLUE GREEN RED YELLOW
+ # prefer terminal safe colored and bold text when tput is supported
+ if tput setaf 0 &>/dev/null; then
+ ALL_OFF="$(tput sgr0)"
+ BOLD="$(tput bold)"
+ BLUE="${BOLD}$(tput setaf 4)"
+ GREEN="${BOLD}$(tput setaf 2)"
+ RED="${BOLD}$(tput setaf 1)"
+ YELLOW="${BOLD}$(tput setaf 3)"
+ else
+ ALL_OFF="\e[0m"
+ BOLD="\e[1m"
+ BLUE="${BOLD}\e[34m"
+ GREEN="${BOLD}\e[32m"
+ RED="${BOLD}\e[31m"
+ YELLOW="${BOLD}\e[33m"
+ fi
+
+ local mesg=$1; shift
+ printf "${RED} ->${ALL_OFF}${BOLD} ${mesg}${ALL_OFF}\n" "$@" >&2
+}
+
+license() {
+ msg "By installing this software you agree to the term of the Segger license."
+ msg "See /usr/share/licenses/jlink-software-and-documentation/License.txt"
+ msg "SEGGER J-Link software may only be used with original SEGGER products and authorized OEM products."
+ msg "The use of the licensed software to operate SEGGER product clones is prohibited and illegal."
+}
+
+pre_install(){
+ license
+}
+
+pre_upgrade() {
+ license
+}
+
+post_install() {
+ udevadm control --reload
+}