Giter Club home page Giter Club logo

Comments (6)

edwinsmith avatar edwinsmith commented on August 10, 2024 1

from skip.

pikatchu avatar pikatchu commented on August 10, 2024

Ok, that's super strange.

There is this piece of logic that should detect a file change. You can find it in the sk script.

if [ -f "$skdir/skfiles" ]; then
    find "$root" -name "*.sk" > "$skdir/skfiles_new"

    if [ $(diff "$skdir/skfiles" "$skdir/skfiles_new") ]; then
	echo "Detected a file configuration change"
        restart
    fi
fi

This should detect that you added or removed a new sk file.

from skip.

aorenste avatar aorenste commented on August 10, 2024

Possibly related - Sometimes (but not every time) I get the following error:

$ sk check compiler/
.../bin/sk: line 218: [: too many arguments

Line 218 is the diff line from your comment.

from skip.

aorenste avatar aorenste commented on August 10, 2024

In particular - I was getting that error when I would expect it to detect a new file...

from skip.

pikatchu avatar pikatchu commented on August 10, 2024

Humm. I just tested on my machine, I don't see any error :-(

How did you install sk?

I did, in the skip root dir:
$ ./prepare-release.sh 0.7 && cd skip-Linux-0.7 && ./install.sh path_to_skip_bin

from skip.

aorenste avatar aorenste commented on August 10, 2024

@edwinsmith's fix is correct - to test you need to add multiple files
Easiest fix is:

@@ -215,7 +215,8 @@
 if [ -f "$skdir/skfiles" ]; then
     find "$root" -name "*.sk" > "$skdir/skfiles_new"

-    if [ $(diff "$skdir/skfiles" "$skdir/skfiles_new") ]; then
+    diff -q "$skdir/skfiles" "$skdir/skfiles_new" > /dev/null
+    if [ $? -ne 0 ]; then
        echo "Detected a file configuration change"
        restart
     fi

from skip.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.