From 746cb149c907ebaf0293582bcb91ce7e9fb7333a Mon Sep 17 00:00:00 2001 From: Marek Marczykowski Date: Sat, 16 Feb 2013 15:27:44 +0100 Subject: [PATCH] use tabs for indentation in shell scripts --- fedorize_image | 25 ++++++++++++------------- qubeize_image | 20 ++++++++++---------- 2 files changed, 22 insertions(+), 23 deletions(-) diff --git a/fedorize_image b/fedorize_image index 0752339..7292725 100755 --- a/fedorize_image +++ b/fedorize_image @@ -12,31 +12,30 @@ exit fi if [ "$VERBOSE" == "1" ]; then - export YUM_OPTS="$YUM_OPTS -q" + export YUM_OPTS="$YUM_OPTS -q" fi if [ -f $IMG ]; then - echo "-> Image file already exists, assuming *update*..." - mount -o loop $IMG mnt || exit 1 - export INSTALLDIR=`pwd`/mnt/ + echo "-> Image file already exists, assuming *update*..." + mount -o loop $IMG mnt || exit 1 + export INSTALLDIR=`pwd`/mnt/ else - echo "-> Preparing instalation of $DIST template..." + echo "-> Preparing instalation of $DIST template..." scripts_"${DIST}"/00_prepare.sh - echo "-> Initializing empty image..." - truncate -s 10G $IMG || exit 1 + echo "-> Initializing empty image..." + truncate -s 10G $IMG || exit 1 - echo "-> Creating filesystem..." - mkfs.ext4 -q -F $IMG || exit 1 + echo "-> Creating filesystem..." + mkfs.ext4 -q -F $IMG || exit 1 - mkdir -p mnt - mount -o loop $IMG mnt || exit 1 + mkdir -p mnt + mount -o loop $IMG mnt || exit 1 - export INSTALLDIR=`pwd`/mnt/ + export INSTALLDIR=`pwd`/mnt/ scripts_"${DIST}"/01_install_core.sh - fi PKGLISTFILE=$(shell [ -r scripts_"${DIST}/packages_$(DIST).list" ] && echo scripts_"${DIST}/packages_$(DIST).list" || echo scripts_"${DIST}/packages.list") diff --git a/qubeize_image b/qubeize_image index 59cb4f8..1966699 100755 --- a/qubeize_image +++ b/qubeize_image @@ -23,18 +23,18 @@ fi ID=$(id -ur) if [ $ID != 0 ] ; then - echo "This script should be run as root user." - exit 1 + echo "This script should be run as root user." + exit 1 fi if [ "$VERBOSE" == "1" ]; then - export YUM_OPTS="$YUM_OPTS -q" + export YUM_OPTS="$YUM_OPTS -q" fi function cleanup() { - if grep -q " $PWD/mnt " /proc/mounts; then - umount mnt/proc mnt - fi + if grep -q " $PWD/mnt " /proc/mounts; then + umount mnt/proc mnt + fi } trap cleanup ERR @@ -64,9 +64,9 @@ echo "--> Creating the Apps Menu templates..." echo "--> Choosing appmenus whitelists..." rm -f appmenus if [ -d "appmenus_$DIST" ]; then - ln -s "appmenus_$DIST" appmenus + ln -s "appmenus_$DIST" appmenus else - ln -s "appmenus_generic" appmenus + ln -s "appmenus_generic" appmenus fi echo "--> Linking /home to /rw/home..." @@ -78,8 +78,8 @@ mv mnt/usr/local mnt/usr/local.orig ln -sf /rw/usrlocal mnt/usr/local if ! [ -r mnt/etc/sysconfig/i18n ]; then - echo "--> Setting up default locale..." - echo LC_CTYPE=en_US.UTF-8 > mnt/etc/sysconfig/i18n + echo "--> Setting up default locale..." + echo LC_CTYPE=en_US.UTF-8 > mnt/etc/sysconfig/i18n fi echo "--> Unmounting $IMG"