LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-04-2013, 11:29 AM   #1
Ewais
LQ Newbie
 
Registered: Nov 2012
Posts: 9

Rep: Reputation: Disabled
builtin: not found. when running shell file.


During installation of a program. this error occured :
Code:
./admin/install/bin/install_customdesigner: 1: ./admin/install/bin/install_customdesigner: builtin: not found
I searched a bit about this. I understood what it means. I even tried to run some commands preceeded by builtin and they worked fine.

but in that shell script they don't. here are the lines that include builtin in the script:
Code:
# No $() construct is used in order to stay compatible with POSIX shell
snps_PKG_INSTL_PLC=`builtin cd \`$DIRNAME $0\` && builtin cd ../../../ && builtin pwd`
if [ $? -ne 0 ]; then $ECHO "$PROGNAME: Error: could not expand installation path. Exiting."; exit 1; fi

SRC_ENV_FILE=${snps_PKG_INSTL_PLC}/bin/.wrapper.sh
$CHMOD 0755 $SRC_ENV_FILE

if [ $? -ne 0 ]; then $ECHO "$PROGNAME: Warning: failed to set execute permissions for $SRC_ENV_FILE. Please run chmod 755 $SRC_ENV_FILE manually."; fi

# Checking for available platforms
AVAILABLE_PLATFORMS=
if [ -d "$snps_PKG_INSTL_PLC/amd64" ]; then
    AVAILABLE_PLATFORMS='amd64'
    if [ -e "$snps_PKG_INSTL_PLC/suse64" ]; then
        if [ -L "$snps_PKG_INSTL_PLC/suse64" ]; then
            echo "'suse64'  link  is  already  created.  To reassign."
            $RM -f $snps_PKG_INSTL_PLC/suse64
            `builtin cd $snps_PKG_INSTL_PLC; $LN -s -f ./amd64 suse64`
        fi
    else
        `builtin cd $snps_PKG_INSTL_PLC; $LN -s -f ./amd64 suse64`
    fi
fi
if [ -d "$snps_PKG_INSTL_PLC/linux" ]; then
    AVAILABLE_PLATFORMS="$AVAILABLE_PLATFORMS linux"
    if [ -e "$snps_PKG_INSTL_PLC/suse32" ]; then
        if [ -L "$snps_PKG_INSTL_PLC/suse32" ]; then
            echo "'suse32'  link  is  already  created.  To reassign."
            $RM -f $snps_PKG_INSTL_PLC/suse32
            `builtin cd $snps_PKG_INSTL_PLC; $LN -s -f ./linux suse32`
        fi
    else
        `builtin cd $snps_PKG_INSTL_PLC; $LN -s -f ./linux suse32`
    fi
fi
if [ -z "$AVAILABLE_PLATFORMS" ]; then $ECHO "$PROGNAME: Error: no binary installations found. Exiting."; exit 1; fi 

builtin cd ${snps_PKG_INSTL_PLC}/bin
if [ $? -ne 0 ]; then $ECHO "$PROGNAME: Error: could not change to '${snps_PKG_INSTL_PLC}/bin directory'. Exiting."; exit 1; fi

WRAPPER_NAME=".wrapper.sh"

for snps_PLATFORM in $AVAILABLE_PLATFORMS 
do

    PLATFORM_DIR=${snps_PKG_INSTL_PLC}/$snps_PLATFORM

    if [ -d ${PLATFORM_DIR}/qt/plugins/imageformats ]; then
        `builtin cd ${PLATFORM_DIR}/platform/bin; $LN -sf ../../../$snps_PLATFORM/qt/plugins/imageformats .`
        if [ $? -ne 0 ]; then $ECHO "$PROGNAME: Warning: could not create symbolic link."; fi
    fi

    [ -d ${PLATFORM_DIR}/platform/bin ] || continue

    for snps_fl in `$LS ${PLATFORM_DIR}/platform/bin`
    do
        snps_fl=`$BASENAME $snps_fl`

        if [ ! -d ${PLATFORM_DIR}/platform/bin/$snps_fl ]; then
            if [ ! -f $snps_fl ]; then
                $LN -s ./${WRAPPER_NAME} $snps_fl
                if [ $? -ne 0 ]; then $ECHO "$PROGNAME: Warning: could not create symbolic link."; fi
            fi
        fi
    done
    [ -d ${PLATFORM_DIR}/OA/bin ] || continue


    for snps_fl in `$LS ${PLATFORM_DIR}/OA/bin`
    do
        snps_fl=`$BASENAME $snps_fl`

        if [ ! -L ${PLATFORM_DIR}/OA/bin/$snps_fl ]; then
            if [ ! -d ${PLATFORM_DIR}/OA/bin/$snps_fl ]; then
                if [ ! -f $snps_fl ]; then
                    $LN -s ./${WRAPPER_NAME} $snps_fl
                    if [ $? -ne 0 ]; then $ECHO "$PROGNAME: Warning: could not create symbolic link."; fi
                fi
            fi

        fi

    done


    if [ -f ${PLATFORM_DIR}/ext/bin/StarXtract_oa ]; then
        if [ ! -f StarXtract_oa ]; then
            $LN -sf ./${WRAPPER_NAME} StarXtract_oa  
            if [ $? -ne 0 ]; then $ECHO "$PROGNAME: Warning: could not create symbolic link. "; fi
        fi
    fi

done


exit 0
 
Old 08-04-2013, 11:33 AM   #2
konsolebox
Senior Member
 
Registered: Oct 2005
Distribution: Gentoo, Slackware, LFS
Posts: 2,248
Blog Entries: 8

Rep: Reputation: 235Reputation: 235Reputation: 235
You should make sure that you're running the script with bash.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Running a shell file multiple times with different arguments each time in a loop kvr2277 Programming 3 08-18-2011 09:29 AM
Shell script to delete file if a pattern is found and restart servers sun81 Linux - Newbie 2 07-22-2010 02:24 PM
running shell script: command not found tripat Red Hat 3 04-14-2010 01:21 PM
[SOLVED] Unexpected end of file error when running a shell script Laughing_Man Linux - Newbie 8 09-14-2009 05:43 PM
Running php file from shell? jchambers Programming 5 02-28-2008 05:56 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:43 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration