Skip to content
Browse files

remove bashisms from source

  • Loading branch information...
1 parent 9055c82 commit a4bf598f202cff6ffa1cec47964c6beac346b773 makefu committed Apr 5, 2013
Showing with 10 additions and 10 deletions.
  1. +1 −1 bin/available_traits
  2. +5 −5 copy_profile
  3. +1 −1 lib/init
  4. +1 −1 prepare
  5. +1 −1 traits/krebs/files/usr/bin/tinc-update
  6. +1 −1 upgrade
View
2 bin/available_traits
@@ -28,7 +28,7 @@ find . | while read line; do
if [ -e "$line/MANIFEST" -o -e "$line/files" ];then
echo "$line" | indent 2
if [ -e "$line/MANIFEST" -a -z "${HIDE_PKGS:-}" ];then
- source "$line/MANIFEST"
+ . "$line/MANIFEST"
echo "Includes Packages: $PACKAGES" | indent 4
fi
if [ -e "$line/files" -a -n "${SHOW_FILES:-}" ];then
View
10 copy_profile
@@ -32,13 +32,13 @@ indent() {
}
handle_append(){
- local CURRENT_TRAIT_DIR="$1"
+ CURRENT_TRAIT_DIR="$1"
cat ${APPEND_FILES}| while read i;do
[ -e "$CURRENT_TRAIT_DIR/files/$i" ] && cat "$CURRENT_TRAIT_DIR/files/$i" >> "$BUILD_DIR/customfiles/$i"
done
}
handle_trait_dir(){
- local CUR="$(readlink -f $1 )"
+ CUR="$(readlink -f $1 )"
if [ "$(readlink -f $TRAIT_DIR )" = "$CUR" ];then
return 0
else
@@ -52,9 +52,9 @@ handle_trait_dir(){
handle_append "$CUR"
fi
if [ -e "$CUR/MANIFEST" ];then
- source "$CUR/MANIFEST"
- echo -n "${PACKAGES:-} " >> $PKG_FILE
- echo -n "${OVERLAY_PACKAGES:-} " >> $OVERLAY_PKG_FILE
+ . "$CUR/MANIFEST"
+ printf '%s' "${PACKAGES:-} " >> $PKG_FILE
+ printf '%s' "${OVERLAY_PACKAGES:-} " >> $OVERLAY_PKG_FILE
fi
fi
View
2 lib/init
@@ -12,7 +12,7 @@ rm -r bin/ || echo "no bindir, skipping removal"
if [ -e ./custom_make ];then
echo "Starting Custom Make"
sh ./custom_make 2>/dev/null | while read line; do
- echo -n .
+ printf "."
done
else
echo "No Custom Make Script exists, bailing out!"
View
2 prepare
@@ -3,7 +3,7 @@ set -euf
IMAGEBUILDER_URL="http://downloads.openwrt.org/attitude_adjustment/12.09-beta2/ar71xx/generic/OpenWrt-ImageBuilder-ar71xx_generic-for-linux-i486.tar.bz2"
cd $(dirname $(readlink -f $0))
-if [ x"${1:-}" == x ];then
+if [ -z "${1:-}" ];then
echo "usage: $0 PROFILE"
echo
HIDE_TRAITS="true" sh $(dirname $(readlink -f $0))/bin/available_profiles
View
2 traits/krebs/files/usr/bin/tinc-update
@@ -1,4 +1,4 @@
#!/bin/sh
if test -e /etc/tinc/retiolum; then
- if ping -c 1 euer.krebsco.de -W 5 &>/dev/null; then (wget -O- http://euer.krebsco.de/retiolum/supernodes.tar.gz | tar xz -C /etc/tinc/retiolum/hosts/);fi
+ if ping -c 1 euer.krebsco.de -W 5 >/dev/null 2>/&1 ; then (wget -O- http://euer.krebsco.de/retiolum/supernodes.tar.gz | tar xz -C /etc/tinc/retiolum/hosts/);fi
fi
View
2 upgrade
@@ -3,7 +3,7 @@ OWN_ADDR=${OWN_ADDR:-192.168.0.1}
PORT=8080
IMAGE=${IMAGE:-openwrt-ar71xx-generic-tl-wr703n-v1-squashfs-factory.bin}
cd $(dirname $(readlink -f $0))
-if [ x"${1:-}" == x ];then
+if [ -z "${1:-}" ];then
echo "usage: $0 ADDRESS"
echo
echo "ENVIRONMENT:"

0 comments on commit a4bf598

Please sign in to comment.
Something went wrong with that request. Please try again.