{"id":50398341,"url":"https://github.com/dtxdf/appscript","last_synced_at":"2026-05-30T22:00:37.781Z","repository":{"id":348178761,"uuid":"1196493361","full_name":"DtxdF/appscript","owner":"DtxdF","description":"Very lightweight script to create self-extractable archives","archived":false,"fork":false,"pushed_at":"2026-03-31T04:41:31.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-31T07:08:05.479Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Roff","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DtxdF.png","metadata":{"files":{"readme":"README.txt","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-30T18:51:36.000Z","updated_at":"2026-03-31T04:41:33.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/DtxdF/appscript","commit_stats":null,"previous_names":["dtxdf/appscript"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/DtxdF/appscript","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DtxdF%2Fappscript","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DtxdF%2Fappscript/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DtxdF%2Fappscript/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DtxdF%2Fappscript/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DtxdF","download_url":"https://codeload.github.com/DtxdF/appscript/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DtxdF%2Fappscript/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33711018,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-30T02:00:06.278Z","response_time":92,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2026-05-30T22:00:33.260Z","updated_at":"2026-05-30T22:00:37.774Z","avatar_url":"https://github.com/DtxdF.png","language":"Roff","funding_links":[],"categories":[],"sub_categories":[],"readme":"NAME\n     appscript - Simple, lightweight and effective tool for creating SFX files\n\nSYNOPSIS\n     appscript -v\n     appscript [-L] [-a arch] [-c algo] [-o filename] [-S sysroot] directory\n\nDESCRIPTION\n     appscript is a very lightweight and easy-to-use tool for creating self-\n     extracting executables.\n\n     From the developer's perspective, tar(1) is used to compress a directory\n     into a tarball, known as the \"payload,\" which is stored in the .rodata\n     section, objcopy(1) to convert the payload into a valid elf(3) object\n     file, and then clang(1) to compile the payload with the C-written stub.\n     And from the user's perspective, it just need to run the executable file,\n     and the magic happens behind the scenes: the AppScript (the SFX file)\n     reads the addresses where the payload is located and uses libarchive(3)\n     to extract the files to a temporary directory, finally executing an\n     executable file named APPSCRIPT. The user can pass any environment\n     variables and arguments to the AppScript, and the APPSCRIPT executable\n     can handle them just like any other program or script.\n\n     However, an AppScript does much more than what has been described above.\n     First, it sets handlers for SIGHUP, SIGINT, SIGQUIT, SIGTERM, SIGXCPU,\n     and SIGXFSZ to stop the AppScript when it's running.  SIGALRM, SIGVTALRM,\n     SIGPROF, SIGUSR1, and SIGUSR2 are ignored. Next, it checks if the\n     /var/tmp/appscript directory exists and, if so, uses it to create\n     temporary directories; otherwise, /tmp is used as fallback. The reason\n     /var/tmp/appscript is preferred is that a system administrator can\n     configure this location to mount a tmpfs(4) filesystem to improve the\n     performance of very large AppScripts. This is more secure than setting\n     \"vfs.usermount=1\" and letting the user (or, in this case, the user's\n     process) mount a tmpfs(4) filesystem. Regardless of the directory used,\n     it must have file mode 1777; otherwise, an EX_NOPERM error will be\n     returned. After initial checks, the tarball is extracted to a temporary\n     location determined by the directories mentioned above.  The AppScript\n     will refuse to extract absolute paths and entries containing periods, and\n     will apply basic protection against symbolic links (see\n     ARCHIVE_EXTRACT_SECURE_SYMLINKS in archive_write_disk(3) for details).\n     Finally, if no signal is received and no errors are detected during the\n     files extraction, the AppScript will attempt to execute the APPSCRIPT\n     file. For this to succeed, the file must have the execute bit set and the\n     owner must be the same as the effective uid, which should be the case\n     since the uid and gid are changed to the caller when the files are\n     extracted. As a final task, the temporary directory is recursively\n     removed in a similar way to the -r and -f flags in rm(1).\n\n     -L   All symbolic links will be followed.\n\t  Normally, symbolic links are archived as such. With this option, the\n\t  target of the link will be archived instead.\n\n     -s   Tells the linker to create a statically linked executable.\n\n     -v   Display version information about appscript.\n\n     -a arch\n\t  Specifies an architecture for the binary other than the default,\n\t  which is the same as the host. Valid arguments are: amd64, aarch64,\n\t  armv7, i386, riscv64, powerpc, powerpc64, and powerpc64le.\n\n     -c algo\n\t  Compression algorithm to be used to compress the directory. Valid\n\t  arguments: gzip, xz, and zstd. The default is zstd.\n\n     -o filename\n\t  Name of the resulting executable. By default, a.AppScript.\n\n     -S sysroot\n\t  Tells clang(1) to use a specified directory as the logical root\n\t  directory for resolving system headers and libraries.\n\n\t  By default, when no argument is specified, it uses the\n\t  %%PREFIX%%/freebsd-sysroot/arch directory only if it exists;\n\t  otherwise, it falls back to /. If you have installed the\n\t  arch-freebsd-sysroot package, this should work correctly, but this\n\t  parameter is primarily necessary when you need to cross-compile a\n\t  statically linked binary.\n\n     directory\n\t  Directory to be compressed.\n\n\t  appscript assumes that the APPSCRIPT script is already present and\n\t  has the execute bit set.\n\nENVIRONMENT\n     APPSCRIPT_PWD\n\t  Since APPSCRIPT runs from the current user's working directory, it\n\t  does not know the location of the temporary directory. This\n\t  environment variable specifies that location.\n\n     APPSCRIPT_SCRIPT\n\t  Absolute path to the AppScript that is currently running.\n\nEXAMPLES\n   Improving performance\n     If you are the sovereign of your system, users will appreciate you if you\n     enable tmpfs(4) at /var/tmp/appscript for very large AppScripts:\n\n\t   # /etc/fstab\n\t   tmpfs   /var/tmp/appscript  tmpfs   rw,size=1G,mode=1777,late  0   0\n\n     Then:\n\n\t   # mkdir -p /var/tmp/appscript\n\t   # mount /var/tmp/appscript\n\n   The \"Hello World\" example\n     To create the most basic AppScript all you have to do is create a\n     directory:\n\n\t   $ mkdir hello-world\n\n     Create the APPSCRIPT file:\n\n\t   $ cat \u003c\u003c EOF \u003e ./hello-world/APPSCRIPT\n\t   #!/bin/sh\n\n\t   echo \"Hello, world!\"\n\t   EOF\n\n     And set the execute bit:\n\n\t   $ chmod +x ./hello-world/APPSCRIPT\n\n     To finally create the AppScript:\n\n\t   $ appscript ./hello-world\n\t   $ ls\n\t   ./a.AppScript\n\t   $ ./a.AppScript\n\t   Hello, world!\n\nSEE ALSO\n     tar(1) libarchive(3) signal(3) sysexits(3)\n\nAUTHORS\n     Jesus Daniel Colmenares Oviedo \u003cDtxdF@disroot.org\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdtxdf%2Fappscript","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdtxdf%2Fappscript","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdtxdf%2Fappscript/lists"}