From 2fca4cadac2f2c382bbf2f88035bc8a1640d6d92 Mon Sep 17 00:00:00 2001 From: Daniel Tartavel Date: Sat, 21 Jul 2018 12:15:40 +0200 Subject: [PATCH] - corrected some bugs --- create_arm_img_urpmi.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/create_arm_img_urpmi.sh b/create_arm_img_urpmi.sh index 8f37996..b0770ba 100755 --- a/create_arm_img_urpmi.sh +++ b/create_arm_img_urpmi.sh @@ -36,7 +36,7 @@ function error() echo -e "\e[1;31m$1\e[0m" } -SOURCE_PATH="$(/bin/dirname \"$(readlink -f \"$0\")\")" +SOURCE_PATH="$(/bin/dirname "$(readlink -f "$0")")" INSTALL_PATH="$SOURCE_PATH/arm" FILES_PATH="$SOURCE_PATH/files" CMDNAME=$(/bin/basename -z "$0") @@ -162,7 +162,7 @@ function createchroot() fi title "Creating $BUILD_PATH" - /bin/mkdir -p "$BUILD_PATH/usr/bin $BUILD_PATH/usr/lib/binfmt.d" + /bin/mkdir -p "$BUILD_PATH/usr/bin" "$BUILD_PATH/usr/lib/binfmt.d" if [ $? -ne 0 ];then error "line $LINENO can't create $BUILD_PATH : exiting" exit 1 @@ -643,9 +643,8 @@ if [ -d "$SOURCE_PATH/$CONFIG_PATH" ];then warning "Config file does not exists, do you want i copy template ? [Y|n] " read yn if [ -z $yn ] || [ $yn = "Y" ] || [ $yn = "y" ];then - /usr/bin/cp "$SOURCE_PATH/config.template" "$SOURCE_PATH/$CONFIG_PATH/config.txt" + /usr/bin/cp "$SOURCE_PATH/config.txt.template" "$SOURCE_PATH/$CONFIG_PATH/config.txt" fi - /usr/bin/cp "$SOURCE_PATH/config.template" "$SOURCE_PATH/$CONFIG_PATH/config.txt" warning "You need now to modify the config file ($SOURCE_PATH/$CONFIG_PATH/config.txt) and relaunch the script" exit 1 fi