Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create-yang-module.sh script does not work on lubuntu (or bash?)? #7

Open
rsharvey opened this issue Mar 27, 2015 · 1 comment
Open

Comments

@rsharvey
Copy link

When trying to set up the Exosense server and add the ckp.yang file, I found that the create-yang-module.sh file would not work. I'm not sure entirely the reason, but changing the "==" equalities to "=" in the bash if statements did the trick. i.e.

if [ $# = 1 ]
then
    REPO=user
    YANG_FILE=$1
elif [ $# = 2 ]
then
    REPO=$1
    YANG_FILE=$2
else
    echo "Usage: $0 [user|system] yang-file"
    exit 255
fi
@magnusfeuer
Copy link
Member

The following version works both under bash and dash (/bin/sh)

if [ "$#" -eq "1" ]
then
REPO=user
YANG_FILE=$1
elif [ "$#" -eq "2" ]
then
REPO=$1
YANG_FILE=$2
else
echo "Usage: $0 [user|system] yang-file"
exit 255
fi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants