{"id":17749435,"url":"https://github.com/oresoftware/quicklock","last_synced_at":"2026-01-21T02:07:24.507Z","repository":{"id":95713035,"uuid":"123240231","full_name":"ORESoftware/quicklock","owner":"ORESoftware","description":"Create a simple one-line mutex, useful for shell scripts.","archived":false,"fork":false,"pushed_at":"2018-05-30T02:58:08.000Z","size":231,"stargazers_count":1,"open_issues_count":13,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-07T18:47:59.509Z","etag":null,"topics":["bash","lock","lockfile","mutex","scripting","shell"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ORESoftware.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-02-28T06:27:54.000Z","updated_at":"2019-12-01T13:41:47.000Z","dependencies_parsed_at":"2023-05-29T04:00:14.738Z","dependency_job_id":null,"html_url":"https://github.com/ORESoftware/quicklock","commit_stats":{"total_commits":83,"total_committers":1,"mean_commits":83.0,"dds":0.0,"last_synced_commit":"da20fa739680566b7f33557c831e14e12d4e012c"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ORESoftware%2Fquicklock","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ORESoftware%2Fquicklock/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ORESoftware%2Fquicklock/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ORESoftware%2Fquicklock/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ORESoftware","download_url":"https://codeload.github.com/ORESoftware/quicklock/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247638468,"owners_count":20971343,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bash","lock","lockfile","mutex","scripting","shell"],"created_at":"2024-10-26T11:23:18.551Z","updated_at":"2026-01-21T02:07:24.473Z","avatar_url":"https://github.com/ORESoftware.png","language":"JavaScript","readme":"\n\n## QuickLock\n\n******************************************************************************************\n\n##### \u003ci\u003einstall\u003c/i\u003e: `$ curl -o- https://raw.githubusercontent.com/oresoftware/quicklock/master/install.sh | bash`\n\nor\n\n##### \u003ci\u003einstall\u003c/i\u003e: `$ wget -q -O - https://raw.githubusercontent.com/oresoftware/quicklock/master/install.sh | bash`\n\n******************************************************************************************\n\n## Simple usage\n\n```bash\n#!/usr/bin/env bash\n\n# acquire lock. will exit with exit code 1, if lock cannot be acquired the first time\n# first and only argument is an optional lockname, if no argument is passed, $PWD will be used as a good default.\n\nql_acquire_lock \"$PWD\"  \n\n# your critical code goes here\n\nfoobarbaz --watch   # this can be whatever you want\n\n# when the script/process exits, lock will automatically be released\n\n```\n\n*******************************************************************************************\n\n### Explicit unlocking\n\nFor most use cases you don't need to explicitly unlock.\n\n```bash\n#!/usr/bin/env bash\n\nql_acquire_lock \"$PWD\" \n\n# your critical code goes here\necho \"foo bar bar\"\n\n# we can release the lock here if we want and continue with more commands \n\nql_release_lock \u003clockname\u003e  # lockname is an optional argument\n\n# we released the lock, because we are done with the critical section\n# now we can run whatever\n\ndosomethingelse here\n\n\n```\n*****************************************************************************\n\n## Debugging\n\nTo get a list of all the quicklock locks that exist, use:\n\n`$ ql_ls`\n\nTo determine which process holds a lock, use:\n\n`$ ql_find \u003clockname\u003e  # lockname is optional`\n\n`ql_find` echos a pid, if the lock exists. To find out information about that pid, you can use:\n\n`$ ps -p \u003cpid\u003e`\n\nor just do this:\n\n`$ ql_find | xargs ps -p`\n\n\n******************************************************************************\n\n### Colors\n\nTerminal colors/styling is on by default.\n\nTo turn off color use:\n\n`$ ql_no_color`\n\nto turn colors back on, use:\n\n`$ ql_add_color`\n\n\n\n\n\n\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foresoftware%2Fquicklock","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foresoftware%2Fquicklock","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foresoftware%2Fquicklock/lists"}