summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKieran Bingham <kieran.bingham@ideasonboard.com>2021-07-14 14:38:31 +0100
committerKieran Bingham <kieran.bingham@ideasonboard.com>2021-07-14 14:49:46 +0100
commit60796ee4c7bcf45e1da341e85266b99871da5350 (patch)
treeae3aa6ef46e29f03b17f2bf3d187757c05c7f578
parentd1a6438a6e4ce92fa85e9fcd31dfad2b340d5d62 (diff)
common: Abstract src dir for libcamera
Move the libcamera sources under src/ and abstract the source location through a srcdir helper. Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
-rw-r--r--.gitignore1
-rwxr-xr-x01-update-libcamera.sh2
-rwxr-xr-x03-update-patchwork.sh2
-rwxr-xr-x10-build-matrix.sh2
-rwxr-xr-x20-coverity-scan.sh2
-rwxr-xr-x30-package.sh2
-rwxr-xr-x50-unit-tests.sh2
-rwxr-xr-xcommon.sh5
8 files changed, 12 insertions, 6 deletions
diff --git a/.gitignore b/.gitignore
index 0bcbf86..0e86ac9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,6 +1,7 @@
logs
stamps
cov-analysis*
+src/
libcamera
simple-cam
diff --git a/01-update-libcamera.sh b/01-update-libcamera.sh
index ec7be48..e55198f 100755
--- a/01-update-libcamera.sh
+++ b/01-update-libcamera.sh
@@ -6,7 +6,7 @@ source ./common.sh
REPO=git://linuxtv.org/libcamera.git
-LIBCAMERA=${1:-$(pwd)/libcamera}
+LIBCAMERA=${1:-$(srcdir libcamera)}
if [ ! -d $LIBCAMERA ] ;
then
diff --git a/03-update-patchwork.sh b/03-update-patchwork.sh
index 43295a6..a809266 100755
--- a/03-update-patchwork.sh
+++ b/03-update-patchwork.sh
@@ -4,7 +4,7 @@
source ./common.sh
-LIBCAMERA=${1:-$(pwd)/libcamera}
+LIBCAMERA=${1:-$(srcdir libcamera)}
BOT=$(pwd)/scripts/git-patchwork-bot.py
ID=patchwork-bot
diff --git a/10-build-matrix.sh b/10-build-matrix.sh
index 6aebd7a..56973a6 100755
--- a/10-build-matrix.sh
+++ b/10-build-matrix.sh
@@ -11,7 +11,7 @@
source ./common.sh
-LIBCAMERA=${1:-$(pwd)/libcamera}
+LIBCAMERA=${1:-$(srcdir libcamera)}
ID=build-matrix
check_version $LIBCAMERA $ID
diff --git a/20-coverity-scan.sh b/20-coverity-scan.sh
index 169fce2..935d355 100755
--- a/20-coverity-scan.sh
+++ b/20-coverity-scan.sh
@@ -12,7 +12,7 @@ set -e
source ./common.sh
-LIBCAMERA=${1:-$(pwd)/libcamera}
+LIBCAMERA=${1:-$(srcdir libcamera)}
ID=coverity
BRANCH=$(libcamera_branch "$LIBCAMERA")
diff --git a/30-package.sh b/30-package.sh
index 37bf89d..96c14c1 100755
--- a/30-package.sh
+++ b/30-package.sh
@@ -7,7 +7,7 @@
source ./common.sh
-LIBCAMERA=${1:-$(pwd)/libcamera}
+LIBCAMERA=${1:-$(srcdir libcamera)}
BUILD=${2:-$(pwd)/builds/coverity}
ID=package
diff --git a/50-unit-tests.sh b/50-unit-tests.sh
index 2fc5427..150d46b 100755
--- a/50-unit-tests.sh
+++ b/50-unit-tests.sh
@@ -8,7 +8,7 @@ source ./common.sh
ID=unit-tests
logfile=$(log_filename $ID)
-LIBCAMERA=${1:-$(pwd)/libcamera}
+LIBCAMERA=${1:-$(srcdir libcamera)}
BUILDDIR=${2:-$(builddir coverity)}
set -e
diff --git a/common.sh b/common.sh
index 768ac5d..3ef1745 100755
--- a/common.sh
+++ b/common.sh
@@ -6,6 +6,7 @@
LOGS=$(pwd)/logs
STAMPS=$(pwd)/stamps
BUILDS=$(pwd)/builds
+SOURCES=$(pwd)/src
libcamera_version() {
project="$1"
@@ -30,6 +31,10 @@ builddir() {
echo "$BUILDS/$1"
}
+srcdir() {
+ echo "$SOURCES/$1"
+}
+
check_version() {
project="$1"
ID="$2"