((section 2 "Outdated egg!" (p "This is an egg for CHICKEN 4, the unsupported old release.  You're almost certainly looking for " (int-link "/eggref/5/install" "the CHICKEN 5 version of this egg") ", if it exists.") (p "If it does not exist, there may be equivalent functionality provided by another egg; have a look at the " (link "https://wiki.call-cc.org/chicken-projects/egg-index-5.html" "egg index") ". Otherwise, please consider porting this egg to the current version of CHICKEN.") (tags "egg")) (section 2 "install" (toc) (section 3 "Description" (p "A Scheme implementation of the Unix utility " (i "install") ".")) (section 3 "Documentation" (def (sig (procedure " (install-file FILES TARGET #!key OWNER GROUP (MODE 755) PRESERVE-TIME)" (id install-file))) (p "File(s) are copied to the target file or directory. If the destination is a directory, then the file is copied into the directory with its original filename. If the target file already exists, it is overwritten if permissions allow. " (tt "install-file") " attempts to prevent installing a file onto itself. Installing " (i "/dev/null") " (" (i "nul") " on Windows) creates an empty file. " (i "mode") " must be expressed in octal notation; " (i "mode") ", " (i "owner") " and " (i "group") " are ignored on Windows. The return value is unspecified.")) (def (sig (procedure "(install-dir DIRECTORIES #!key OWNER GROUP (MODE 755))" (id install-dir))) (p "Create all components of the given directory(ies). " (i "mode") " must be expressed in octal notation; " (i "mode") ", " (i "owner") " and " (i "group") " are ignored on Windows. The return value is unspecified.")) (def (sig (syntax "(install [-p] [-g GROUP] [-m MODE] [-o OWNER] SRC DST)" (id install)) (syntax "(install [-p] [-g GROUP] [-m MODE] [-o OWNER] SRC ... DIR)" (id install)) (syntax "(install      [-g GROUP] [-m MODE] [-o OWNER] -d DIR ...)" (id install))) (p "Handy command-line-like syntax around " (tt "install-file") " and " (tt "install-directory") ".")) (def (sig (procedure "(file=? FILE1 FILE2)" (id file=?))) (p "Determine whether two paths represents the same file."))) (section 3 "Examples" (highlight scheme "(use install)\n\n(install -?)\n(install -d \"/tmp/tests\")\n(install -d \"C:\\\\tmp\\\\tests\")\n(install -d \"C:/tmp/tests\")\n(install -d \"/tmp/tests/a\" \"/tmp/tests/b\")\n(install -d -m 644 \"/tmp/tests\")\n\n(install -m 644 \"file1\" \"/tmp/tests\")\n(install -m 644 \"file1\" \"file2\")\n(install -m 644 \"file1\" \"file2\" \"/tmp/tests\")\n(install -o \"mikele\" -m 644 \"file1\" \"/tmp/tests\")\n(install -m 644 -p \"file1\" \"/tmp/tests\")\n(install \"/dev/null\" \"/usr/bin/empty\")\n(install \"nul\" \"C:/bin/empty\")\n\n(install-file \"file1\" \"/tmp/tests\")\n(install-file '(\"file1\") \"/tmp/tests\")\n(install-file '(\"file1\" \"file2\") \"/tmp/tests\")\n(install-file (glob \"file*\") \"/tmp/tests\")\n(install-file \"file1\" \"/tmp/tests\" mode: 644)\n\n(install-directory \"/tmp/tests\")\n(install-directory '(\"/tmp/tests\"))\n(install-directory '(\"/tmp/tests/a\" \"/tmp/tests/b\"))\n(install-directory \"/tmp/tests\" group: 0 owner: \"mikele\")\n\n(begin (create-symbolic-link \"vi\" \"emacs\")\n       (file=? \"emacs\" \"vi\"))                                ;; #t\n(begin (change-directory \"C:\\\\Windows\")\n       (file=? \"C:\\\\Windows\\\\notepad.exe\" \"notepad.exe\"))    ;; #t")) (section 3 "Requirements" (p "None. Windows (mingw32) users need to build CHICKEN from git (or a stability version > 4.9.0.1).")) (section 3 "Installation" (highlight sh "$ chicken-install install") (p "Optionally a command-line utility (" (i "instll") ") is also available.") (highlight sh "$ chicken-install install -D install-cmd") (highlight sh "$ instll\nUsage:\n\n  instll [-p] [-g GROUP] [-m MODE] [-o OWNER] SRC DST\n  instll [-p] [-g GROUP] [-m MODE] [-o OWNER] SRC ... DIR\n  instll      [-g GROUP] [-m MODE] [-o OWNER] -d DIR ...\n\n  -g      Set group ownership, instead of process' current group.\n\n  -m      Set permission mode instead of rwxr-xr-x (755). The mode must\n          be expressed in octal notation.\n\n  -o      Set ownership (super-user only).\n\n  -p      Preserve timestamps. Apply modification time of SRC files to\n          corresponding destination files.")) (section 3 "About this egg" (p "The source code is hosted at " (link "https://bitbucket.org/mklm/install/" "Bitbucket") ". Feel free to send pull requests or open an issue there. Alternatively, send an e-mail to the " (link "mailto://chicken-users@nongnu.org" "chicken-users") " mailing list for information or requests.") (section 4 "Version History" (dl (dt "1.0.1") (dd "Initial release"))) (section 4 "Author" (p "Michele La Monaca")))))