using wget (or other) download highest file version from dropbox - dropbox

I use the windows variant of wget for scripted downloads of various files but was wondering if it could achieve the following.
Where I work, new versions of the software are regularly released into the company dropbox. I am tasked with making a script that can interrogate the versioning of the file name in the dropbox folder and if its a newer file version than the one currently in the folder where the script was run, it will download and update the file. Kind of like "check for update" kind of thing (newer file version found, downloading, please wait)
Is this possible with Wget or would I need a different program altogether?
Many thanks

It will need using dropbox API. Read in https://www.dropbox.com/developers/documentation/http/overview may can help.

Related

WEKA not identifying .ARFF files on M1 Mac

I have downloaded the latest version of WEKA on a newer Mac with the M1 chip and am having trouble opening .ARFF files. When I go to open the file, the file is not appearing as an option to open. It is perhaps a problem with permissions? But when I look at the permissions for the app, I am able to read and write. I am not getting an error message of any sort. I can only see the directories and no files.
Has anyone else had this problem and found a solution?
Many thanks!
I tried uninstalling and making sure I had downloaded the latest version of WEKA and I tried moving the .ARFF file to a new location.

I have created a package of an App using nw.js. How can i create a dmg file to distribute it?

Actually there i have a html, CSS and java script based app and i created build of it using nw.js technology using build command. The problem is i want the application in dmg format. please help me finding way.
thank you.
There are many different ways to package your app. You should read the documentation:
https://nwjs.readthedocs.io/en/latest/For%20Users/Package%20and%20Distribute/
I do not know of any tutorials for creating an NW.js package as a DMG. Because the final dist is a single .app file, you could distribute that directly, or compressed in a Zip file or something similar. You may be able to look up instructions around DMG packaging that is not specific to NW.js and apply the concepts. If so, and you get it to work, you should write a blog post or tutorial about it.
You can use https://www.npmjs.com/package/appdmg to create an installer for your NW App on macOS platforms.
In my ongoing development for the same i found the making a .pkg installer is better than making .dmg with reasons you can search for.
so i found two solutions for the same.
packages(an application you can package anything with signed developer id)
buildPkg(a command line process to make package)
in both you just need to add your application.app as mentioned in documentation and follow the steps.

Can't find previously downloaded files in WSL

I'm not very experienced in *nix operating systems and I'm trying to set up an embedded programming environment in WSL, but I'm getting hung up on basic issues. Last time I was working on this project I had downloaded some files (cargo and rustup, but that shouldn't matter), and I confirmed that they were there and working by getting the version number with -V.
After restarting my computer WSL doesn't recognize rustup or cargo as commands, and the folders don't show up with ls, even though they show up when I check for them in Windows Explorer.
The directory I've been working out of is %LOCALAPPDATA%\Packages\TheDebianProject.DebianGNULinux_76v4gfsz19hv4\LocalState\rootfs\home*user* which I'm pretty sure is the default. I’ve verified this by creating a .txt in WSL and finding it with Windows Explorer
Working on Windows 10 64-bit. I chose Debian for arbitrary reasons/ open to switching.
I’m not too worried about the files themselves, I just want to be able to avoid this in the future.
Firstly since you are new to WSL please be aware that the recommendations are to not under any situations edit or modify any Linux files inside of your %LOCALAPPDATA% folder using Windows apps or tools which includes moving files using file explorer. See this blog post from Microsoft https://devblogs.microsoft.com/commandline/do-not-change-linux-files-using-windows-apps-and-tools/ If you do you can see corruptions missing files and crashes.
I have no experience with cargo or rust but it sounds like you didnt update your .bashrc (start up script) with details needed to add things to the environment on start up.
There are a few things you can do
Use the history command to look back at what you did when you installed things
Use sudo find / -name rust to look for the executable in your system
When using ls remember that files/folders that begin with a dot are hidden so you need to use ls -al to see them in the terminal
I assume you followed this guide for installation (or similar). If you did not and are still having issues please detail how you installed things.

Cocoa - How to copy files to /usr/share?

I'm developing an "installation" like cocoa application wich needs to take care of some http request, some file system reading, copying files to /usr/share, set up cron (not launchd) and ask some information to user.
I discarded PackageMaker since I need more flexibility.
Currently everything is going well, but on my last installation step, I need to:
Delete my previously installed application folder (if exists). It's always the same path: /usr/share/MY_APP
Create again the application folder at: /usr/share/MY_APP
Copy application files to /usr/share/MY_APP
Update a cron job
It's very important that /usr/share/MY_APP keeps protected with administrative privileges, so a regular shouldn't delete it.
What would be the best approach to implement those steps?
BTW, I'm using Xcode 3.2.
Thanks a lot!
Carlos.
Between the preflight script, the postflight script, and perhaps an Installer plug-in for the custom UI, I see no reason why you can't do all of this in PackageMaker.
Note: “Installer plug-in” is a little misleading. The user does not have to install the plug-in somewhere as a separate step; you include the plug-in inside your package, and Installer will use it from there.
The relevant document is a ReadMe file in a sample code project. There's also an Installer plug-in project template in Xcode since 2.0.
Also, an Installer plug-in won't get used if the user does a command-line installation. Of course, they can't install from the command line at all (which includes remote installation onto an office or lab full of machines) if you write your own custom installer.
By the way: Why /usr/share? What are you putting there? There may be a better way to do what you're really trying to accomplish.

Cross platform patching

I have a program that I intend to install on Linux and Windows machines. I have it cross-compiling fine (with autotools), but at some point I would like the program to be able to update its binaries. The only ways I can think of doing this are:
Give users write access to "C:\Program Files\Foo Program" or "/usr/bin/foo_program".
or
Install the program to the user's profile/home directory.
Neither of these seems like a good idea. What would you do?
You need to give us more details on what you are trying to do - I don't understsand the link between cross platform, patching and your question.
If you need to be able to auto update the program, on linux at least, the best solution is to provide a binary package (rpm, deb, whatever, depending on your target), which is updated regularly - so that new versions will be picked up by the package manager. On windows and mac os x, things are usually more decentralized, each program has its own update manager. The best technical solution depends on the technology (C/C++/python/whatever). One exception I can think of on Linux is vmplayer, which tells you when there is a new version - but you still have to install the new version.
If the program binary is writeable, you could download the patch or the new bits to %TEMP% or /tmp then apply them to the binary. I don't think you need to be able to create new files in the directory. But you're going to run into problems on Windows with the file being in use while you try and patch it.