forked from cvetaevvitaliy/stm32mp1-ubuntu
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patherror.sh
35 lines (28 loc) · 799 Bytes
/
error.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/sh -e
DIR=$PWD
echo "\n\n\n"
echo "-----------------------------"
echo "Script Error: please cut and paste the following into to GitHub issue "
echo "**********************************************************"
echo "Error: [${ERROR_MSG}]"
if [ -f "${DIR}/.git/config" ] ; then
gitrepo=$(cat "${DIR}/.git/config" | grep url | awk '{print $3}')
gitwhatchanged=$(git whatchanged -1)
echo "git repo: [${gitrepo}]"
echo "-----------------------------"
echo "${gitwhatchanged}"
echo "-----------------------------"
else
if [ "${BRANCH}" ] ; then
echo "nongit: [${BRANCH}]"
else
echo "nongit: [master]"
fi
fi
echo "uname -m"
uname -m
if [ "$(which lsb_release)" ] ; then
echo "lsb_release -a"
lsb_release -a
fi
echo "**********************************************************"