Skip to content

Commit 9390f2a

Browse files
Salamandarmtwebster
authored andcommitted
Merge build and buildall into a script taking N arguments or none
1 parent 56bb6a2 commit 9390f2a

File tree

2 files changed

+18
-30
lines changed

2 files changed

+18
-30
lines changed

build

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,20 @@
1-
#!/bin/sh
1+
#!/usr/bin/env bash
2+
set -Eeuo pipefail
23

3-
for i in `find ./ -maxdepth 1 -mindepth 1 -type d`; do
4-
if [ $i = "./.git" ]; then
5-
continue
6-
fi
7-
if [ $i != ./$1 ]; then
8-
continue
9-
fi
10-
cd $i
11-
echo ....
12-
echo ....
13-
echo ........................................... BUILDING: $i
14-
echo ....
15-
echo ....
16-
dpkg-buildpackage -j$(( $(cat /proc/cpuinfo | grep processor | wc -l)+1 ))
17-
cd ..
4+
if (( $# >= 1 )); then
5+
projects=( "$@" )
6+
else
7+
readarray -t projects < <(grep -v '# ' build-order)
8+
fi
9+
10+
for project in "${projects[@]}"; do
11+
echo ....
12+
echo ....
13+
echo ........................................... BUILDING: "$project"
14+
echo ....
15+
echo ....
16+
17+
pushd "$project" >/dev/null
18+
mint-build
19+
popd >/dev/null
1820
done

buildall

Lines changed: 0 additions & 14 deletions
This file was deleted.

0 commit comments

Comments
 (0)