summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <lars.wirzenius@codethink.co.uk>2012-02-27 17:01:21 +0000
committerLars Wirzenius <lars.wirzenius@codethink.co.uk>2012-02-27 17:01:21 +0000
commitc5fc68fa232e88ec3e5e40aaec619280554886a9 (patch)
tree6e9a40ccece90b1e0151dd4afbee4c33a81044cf
parentff0d9d9c8fc4cfae879c2a79adeb239f77d9f451 (diff)
downloadmorph-c5fc68fa232e88ec3e5e40aaec619280554886a9.tar.gz
Expand TAB characters and make check check for them
-rwxr-xr-xbaserock-bootstrap14
-rwxr-xr-xcheck13
-rwxr-xr-xmkimage.sh6
3 files changed, 23 insertions, 10 deletions
diff --git a/baserock-bootstrap b/baserock-bootstrap
index 282c7f85..b04b9bc3 100755
--- a/baserock-bootstrap
+++ b/baserock-bootstrap
@@ -379,7 +379,7 @@ pass1_bash()
make -j$JOBS
# make tests
make install
- ln -s "$tools/bin/bash" "$tools/bin/sh"
+ ln -s "$tools/bin/bash" "$tools/bin/sh"
rm -rf "$sources/bash-4.2"
fi
}
@@ -616,7 +616,7 @@ pass1_tar()
then
unpack tar-1.26
cd "$sources/tar-1.26"
- # mknod check fails without
+ # mknod check fails without
FORCE_UNSAFE_CONFIGURE=1 ./configure --prefix="$tools"
make -j$JOBS
# make check
@@ -751,11 +751,11 @@ pass2_prepare_for_chroot()
if [ ! -d "$LFS/etc" ]
then
- $HOST_SUDO mkdir -p "$LFS/etc"
- $HOST_SUDO chmod 777 "$LFS/etc"
- $HOST_SUDO touch "$LFS/etc/ld.so.conf"
- $HOST_SUDO chmod 666 "$LFS/etc/ld.so.conf"
- cat <<EOF > "$LFS/etc/ld.so.conf"
+ $HOST_SUDO mkdir -p "$LFS/etc"
+ $HOST_SUDO chmod 777 "$LFS/etc"
+ $HOST_SUDO touch "$LFS/etc/ld.so.conf"
+ $HOST_SUDO chmod 666 "$LFS/etc/ld.so.conf"
+ cat <<EOF > "$LFS/etc/ld.so.conf"
/lib64
/lib
/usr/lib64
diff --git a/check b/check
index b214301b..3fa7d1a9 100755
--- a/check
+++ b/check
@@ -26,4 +26,17 @@ if [ -d .git ];
then
echo "Checking copyright statements"
git ls-files | xargs scripts/check-copyright-year
+
+ echo 'Checking source code for TAB characters'
+ git ls-files |
+ grep -v '\.gz$' |
+ while read x
+ do
+ if tr -cd '\t' < "$x" | grep . > /dev/null
+ then
+ echo "ERROR: $x contains TAB characters" 1>&2
+ errors=1
+ fi
+ done
fi
+exit $errors
diff --git a/mkimage.sh b/mkimage.sh
index 0c137bf8..af0c9759 100755
--- a/mkimage.sh
+++ b/mkimage.sh
@@ -7,8 +7,8 @@ EOF
}
if [ "$#" -le 1 ]; then
- usage
- exit 1
+ usage
+ exit 1
fi
img="$1"
@@ -29,7 +29,7 @@ sudo mount "$part" "$mp"
trap "sudo umount $part; sudo kpartx -dv $img" EXIT
for stratum; do
- sudo tar -C "$mp" -xf "$stratum"
+ sudo tar -C "$mp" -xf "$stratum"
done
cat <<EOF | sudo tee "$mp/etc/fstab"