Skip to content

Instantly share code, notes, and snippets.

@mvidner mvidner/Intermediate.ycp
Last active Dec 17, 2015

What would you like to do?
// if Modelist is imported here the test passes
// import "Modelist";
import "Intermediate";
// Modelist::Hello();
module "Intermediate";
import "Modelist";
global void Hello() {
module "Modelist";
string greeting = nil;
global void Hello() {
y2milestone("%1", greeting);
// Modelist - Konstruktor
global void Modelist() {
greeting = "Zdravstvuj!";
# test the constant lookup issue
# run it from the ycp killer directory so that bundle exec finds y2r
DIR=$(dirname $0)
title() {
figlet $1 2> /dev/null && return
echo $1
echo ====
y2r() {
bundle exec y2r --module-path $DIR/modules $DIR/$1 $DIR/ruby/${1%.ycp}.rb
cd $DIR
title YCP
ln -snf . modules
ln -snf . clients
ycpc -c modules/Modelist.ycp
Y2DIR=. ycpc -c modules/Intermediate.ycp
Y2DIR=. /usr/lib/YaST2/bin/y2base -l - constant-lookup UI
title RUBY
mkdir -p ruby/modules ruby/clients
cd -
y2r modules/Modelist.ycp
y2r modules/Intermediate.ycp
y2r clients/constant-lookup.ycp
Y2DIR=$DIR/ruby /usr/lib/YaST2/bin/y2base -l - constant-lookup UI
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.