Giter VIP home page Giter VIP logo

arduinolibraryquickfix's Introduction

Arduino Library Quick Fix

Once in a while I have a problem with a "libraries" folder of Arduino IDE: after a library's update IDE creates files "* 2.cpp" (.h, etc.) and it crushed any attemp to compile the sketch.

Manual fix is: walt through the folder and its subfolders and delete all files with " 2" in a name. Boring and takes a lot of time.

The root of the problem is iCloud.

  1. IDE install the liubrary
  2. Mac OS see they are untouced and unloads them into cloud
  3. Now the files are changed to name.icloud
  4. IDE wants to update library and see no files (as they are .icloud now). You can easy check this open Finder ("normal" files) and Terminal (.icloud ones)
  5. Mac OS by somehow make a mess here (unclear for me but this is true)
  6. Now you have "* 2.*" files

Before start it all: close the IDE

How I fix the problem in two steps:

  • Make sure all files are now downloaded from the cloud and are files not a links
  • Find and delete

How to "download" files from cloud to the disk and make 'em files again:

cd ~/Documents/Arduino/libraries
find . -type f -name "*.icloud" -exec brctl download {} \;

this will download 'em all. Make sure they are by searching find . -type f -name "*.icloud" the list have to be empty.

Now find and delete:

find ./ -name "* 2.*" -type f -delete

and make sure they are: find ./ -name "* 2.*" -type f once it also was a directory, so find ./ -name "* 2.*" -type d helps to find 'em. Be careful with folder deletion as far as sometims it can be legitime one in a code.

Now re-open IDE and update libraries.

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.