4/18/2023 0 Comments Install lzip on macPutting links to a tool in /usr/local/bin has a few downsides (or upsides, depending on your perspective): Since symbolic links use paths, this has the advantage that when you download a newer version of the project to the same location, the link will point to the new version. Lrwxr-xr-x 1 root wheel /usr/local/bin/quickpkg -> /Users/armin/Projects/quickpkg/quickpkg I keep the project folders of tools in ~/Projects so I use the command: $ sudo ln -s ~/Projects/quickpkg/quickpkg /usr/local/bin Instead of moving the tool, you can create a symbolic link to the tool in /usr/local/bin. Also some tools may require additional resources or libraries that reside in its project directory. When the tool get’s updated you will have to copy the newer version, as well. However, copying the tool has some downsides. usr/local/bin is also in the default macOS PATH. This is the designated directory for custom commands. You could add the project directory of the tool you just added to the PATH, but that would be tedious to manage.Īn easier solution is to copy the tool to /usr/local/bin. The PATH environment variable lists the directories where the shell looks for commands. But for tools that you want to use frequently typing the path to the tool is quite cumbersome. This will do for tools that you use rarely. You can already change directory to this folder in Terminal (drag the folder on to the Terminal icon to open a new Terminal already changed to it) and run the tool directly: $ cd ~/Projects/quickpkg/ However you get the project you will now have a directory with the tool and any supporting files. However, that is a topic for another post. If you rather use git to download and manage the code, then you can do that here, too. If you want an updated version in the future you will simply download the newer version and replace the tool you already have. If you just want to use the current version, then that is fine and will serve you well. When you download the archives, either through the releases page or from the ‘Download ZIP’ button, the resulting project folder will not be connected with the Github project any more. ‘Download ZIP’ will simply download an archive of the current state of project, much like the release download would. When you click that button it will expand to show some more options. There is a large green ‘Clone or download’ button on the right area above the project’s file list for this. (You will see ‘0 releases’ in the tool bar.) Then you can still download the most recent version of the project. Some projects provide other archives or installers such as dmg or pkg as well. At the very least each release will have a snapshot of the project’s code as a zip or tar.gz archive. On the releases page you will see a list of releases with the newest on top. Releases will be shown in the project’s ‘releases’ page (link in the middle of the page, above the file list). Contributors of a project have the option of marking steps of the project as a ‘release.’ Releases are considered a tested and stable stop in between less reliable developmental steps. Github is one popular service to host these projects online. Git is a version management tool that lets you track changes throughout the coding process. It is worth to read the ReadMe in case they have special installation instructions. The page has a menu area up top, a file list in the middle and below an area where an introduction to the project (the ReadMe file) is shown. My quickpkg tool, for example, is a python script hosted as an open Github repository.When you follow that link you will see the main project page. Many admins share their scripts and tools through a hosted service like Github. Getting the Toolīefore you can choose a method to run the tool, you need to get it. There are actually several approaches to getting these tools to actually work for you, most with different upsides and downsides. The assumption is, that when you use these tools you are familiar enough with the shell to make them work. However, many of these tools, such as munkipkg or my own quickpkg just come as a git project folder, with no or few instructions to get it set up. ( /usr/local/bin is in the macOS default PATH.) Some of these tools provide installer packages that deploy the tool in the proper directory – usually /usr/local/bin so that you and other users can use it. (Just a representative list, certainly not complete.) There are many command line tools and scripts you can download and install that are very useful for Mac Admins.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |