dot

packages and services management
Log | Files | Refs | README

commit f46361e88e7d56a1ce5ff8e7122a1394ec77c8f9
parent dbefee0947902f55a2a2334ad6b9b1589ef8e343
Author: Josuah Demangeon⠠⠵ <mail@josuah.net>
Date:   Tue,  4 Apr 2017 21:47:57 +0200

fake quine

Diffstat:
M.profile | 2+-
Mbin/io-abduco | 5++++-
Mbin/io-man | 2+-
Mbin/io-music | 2+-
Mbin/io-setfont | 2+-
Mbin/version | 14++------------
Aman/README | 244+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Rman/man1/build.1 -> man/build.1 | 0
Dman/man1/version.1 | 157-------------------------------------------------------------------------------
Aman/version.1 | 158+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Rman/man1/www-git.1 -> man/www-git.1 | 0
Rman/man1/www-tree.1 -> man/www-tree.1 | 0
12 files changed, 412 insertions(+), 174 deletions(-)

diff --git a/.profile b/.profile @@ -10,7 +10,7 @@ export PLAN9="$HOME/9" # paths export PATH="$CONFIG/bin:$PATH:$PLAN9/bin" -export MANPATH="$CONFIG/man" +export MANPATH="$CONFIG/man:$MANPATH" export ENV="$HOME/.profile" export MAIL="$HOME/mail/INBOX" diff --git a/bin/io-abduco b/bin/io-abduco @@ -6,7 +6,10 @@ then exit 1 fi -name="$(abduco | tail -n +2 | iomenu -l 10 | sed -r 's/[^\t]*\t[^\t]*\t//')" +name="$( + abduco | tail -n +2 | iomenu -l 10 -p 'abduco' | + sed -r 's/[^\t]*\t[^\t]*\t//' +)" printf '\033[H\033[J' diff --git a/bin/io-man b/bin/io-man @@ -2,5 +2,5 @@ mandoc -a "$( IFS=':' - find $MANPATH ! -type d -name '*.[0-9]' | sort -u | iomenu -l 255 + find $MANPATH ! -type d -name '*.[0-9]' | sort -u | iomenu -p man -l 255 )" diff --git a/bin/io-music b/bin/io-music @@ -4,7 +4,7 @@ MUSIC="$HOME/music" path="$( cd "$MUSIC" || exit 1 - find . | sort | iomenu -l 255 + find . | sort | iomenu -l 255 -p music )" IFS=' diff --git a/bin/io-setfont b/bin/io-setfont @@ -1,7 +1,7 @@ # set tty font using iomenu -l 255 setfont "$( - xargs -I {} find {} -type f << EOF | sort | iomenu -l 255 + xargs -I {} find {} -type f << EOF | sort | iomenu -l 255 -p setfont /usr/share/kbd/consolefonts /usr/share/consolefonts /share/kbd/consolefonts diff --git a/bin/version b/bin/version @@ -16,20 +16,10 @@ die() } -opt() -{ - [ -z "${1#$2}" ] && printf '%s %-20s %s\n' "${0##*/}" "$3" "$4" -} - - usage() { - opt "$1" i 'i[nit]' "new \".v\" directory in \"$PWD\"" - opt "$1" n 'n[ew]' 'new revision saving all tree content' - opt "$1" d 'd[diff] [1 2]' 'diff revisions 1 and 2 (or latests)' - opt "$1" r 'r[evision] REV' 'switch tree to revision REV' - opt "$1" p 'p[ull] TREE' "import TREE's objects and latest revision" - exit 1 + printf 'version [-i] [-n] [-d rev1 rev2] [-r rev] [-p tree]\n' + exit 1 } diff --git a/man/README b/man/README @@ -0,0 +1,244 @@ +printf '%s\n\n%s\n' "$(head -n 2 "$0")" "$(mandoc *.1 | sed 's/.\b//g')" > "$0" +exit 0 + +BUIL) GeneraCommandManua BUIL) + +NAM + buil –Instalsourcefrobuilreceipe + +SYNOPSI + buil [-pk] [-pk] [-pk] [-pk] [-] [-] + +DESCRIPTIO + builhelpwitthcompilatioosoftwarithhomdirectoroa + use. IdownloadaarchivfrospecifieURanextracti. + + -pk Downloaanextracthsourcopk. + + -pk Downloapkinopresen,buili,aninstali. + + -pk Removpkanitsource. + + -pk Delet,thedownloaaninstalpkagai. + + - UpdatlinkfroPROGRAMtLOCA. + + - Viethlisoavailablpackage. + +ENVIRONMEN + Everprograiinstalleiitowdirector,theeverfili + linketglobainde. ThPATanMANPAThavtbupdatetth + locatioothbianmasubdirectorieothiindeiordet + accesthbinarieanmanuapageinteractivel. + + Thicabdonbsourcinbuilaregulashelscrip,witth + comman: + + .pattbuil + + Thiwilexporthfollowinenvironmenvariable: + + Nam Defaulvalu + LOCA HOMEloca + CONFI HOMEconfi + PROGRAM HOMEprogram + PAT LOCALsbinLOCALbinPAT + MANPAT LOCALsharemanLOCALmanMANPAT + CPAT LOCALincludeCPAT + LIBPAT LOCALlibLIBPAT + LD_RUN_PAT LOCALlibLD_RUN_PAT + LD_LIBRARY_PAT LOCALlibLD_LIBRARY_PAT + +FILE + Thpackagedescription,URL,anbuilrulearstoreintfile, + storeintthCONFIGbuildirector,witonfilpepackag. + + Thesarshelscriptsourcebbuil ,antheiformaia + followin: + + #singllindescriptio nsheban) + + tahtt:/urtpackagtag + + buil() { + #Optionnabuilrecip + } + + Thbuilrecipioptionna,aniiinoprovide,defaulbuil + recipwilbuseinstea. + +AUTHO + builiwrittebJosuaDemangeo mailjosuahne> + +Linu1ARC Marc,201 Linu1ARC + +------------------------------------------------------------------------------ + +VERSIO) GeneraCommandManua VERSIO) + +NAM + versio –simplversiocontroanbackusyste + +SYNOPSI + versio [-] [-] [-revrev] [-re] [-fil.tre] + +DESCRIPTIO + Versiostorethwholcontenodirectortreaversio + controlle,hasheobject. + + Thipermitbackuanrestorinthcontenaanpoinith + histor,aneverfilionlbackeuoncialanacrosal + version. + + Thfilearalcopieintthfirsleveodirector,renamet + theiowSH25has. Thesfilearobject. + + Thmatchinbetweethesfileantheioriginalocatioials + storetsavthoriginanamothfile. Thfilestorinthi + informatioarrevision. + + -revrev + Difthchangefrorevtrev. + + - Initializneversiodirectorathrooocurren + director. + + - Nerevisioicreate,savinalmodificationforthlas + saverevisio. + + -fil.tre + Pulthobjectfrothfil.treversiodirectorint + thcurrenon. + + -re Reverthchangetanswitcthstattre. + +FILE +  Maiversiodirector. Thdirectoriwhicilocatei + throoversiodirector. + + vobj/ + Directorcontaininthobjectevernameaftethhaso + itconten. + + vrev/ + Directorcontaininthrevisionwhiccontainthliso + file,alonwittheiassociatehashe,ithfollowin + forma: + + 6a2e5ffc2916c10ce723c6866f2680086cef2a1ef0d052b471787adab568bdd .pattfiltx + + Threvisionaralsnameaftetheiconten. + + vlo filcontaininahistoroeverrevisioalisonam + orevisiofile,witonrevisiopelin. + +EXAMPL + Initializneversiodirectoriexistindirector + + $cdat/ + $versio + + Creatnerevisio: + + $versio + makinnerevisio + ba49aa8aabb111af9d3837e4fc1a2c4edf91fb092f9093d09a6d7c5fc15e388 + $touctes + $versio + makinnerevisio + ba49aa8aabb111af9d3837e4fc1a2c4edf91fb092f9093d09a6d7c5fc15e388 + 9e59e557dad5b2c8b66313a2836afd1970990b885d08e728e6cd5a2a7b7df58 + + Diffinlastwrevision: + + $versio $tai lo) + ... + + Finthrevisiocorrespondintfil: + + $gre rlpattfiltx re/ + re9e59e557dad5b2c8b66313a2836afd1970990b885d08e728e6cd5a2a7b7df58 + +Linu1ARC Apri,201 Linu1ARC + +------------------------------------------------------------------------------ + +WWGI LOCA WWGI + +NAM + ww-gi –generatstatiwebsitwitthgicomman + +SYNOPSI + ww-gi + +DESCRIPTIO + ww-giwilcreatgisubdirectoricurrendirectorwiton + subdirectorpegirepositor. Repositoriearspecifiefroth + descriptiofil. + +Linu1ARC Marc2,201 Linu1ARC + +------------------------------------------------------------------------------ + +WWTRE) GeneraCommandManua WWTRE) + +NAM + ww-tre –simpl,recursivstatiwebsitgenerato + +SYNOPSI + cpat &&ww + +DESCRIPTIO + Thonlthinthiscripdoeibuildinonindehtmfoeac + director,includinDIitsel. + + Eacindehtmhathcontenolayouthtmfilithtopat + director,aftebeinparse. + +FILE + Somfileartreateparticularl. + + dilayouhtm + Filcontaininthindehtmpagelayou. + + di/*READM + Th READM"filecontencabdisplayeothpageith + layoucontain {{conten }}keywor. + + di/.* Aldirectoriestartinwit ‘.’wilbignore. + + Alothedirectoriearignoreanleunchange. + +LAYOUFORMA + Withilayouhtm,somtemplatinpermitinserdynamiconten + intthindefile,businthfollowinkeyword. + + {{conten }} + ContenothREADMfilithcurrendirector,ian. + + {{lis }} + Lisolinktsubpagefothcurrendirector includin + dotfile). + + {{na }} + Lisotolevedirectorie,fousa na>elemen. + + {{roo }} + Relativpattthrooothwebsit,forelativlink. + + {{titl }} + Pagtitl,givebthpat,wit "/"replaceb " > ". + +ENVIRONMEN + PW Sourcdirectorfrowhicgeneratthwebsit. Iials + wherthwebsitwilbgenerate. + +SEALS + httpmarmarodthwebsitthagavmthide. + + wer)swer) + +AUTHOR + wwimadbJosuaDemangeo maijosuane⟩ + +Linu1ARC Novembe1,201 Linu1ARC diff --git a/man/man1/build.1 b/man/build.1 diff --git a/man/man1/version.1 b/man/man1/version.1 @@ -1,157 +0,0 @@ -.Dd Apr 4, 2017 -.Dt VERSION 1 -.Os -. -. -.Sh NAME -. -. -.Nm version -.Nd simple version control and backup system -. -. -.Sh SYNOPSIS -. -. -.Nm -.Op Fl i -.Op Fl n -.Op Fl d Ar rev1 rev2 -.Op Fl r Ar rev -.Op Fl p Ar Pa tree -. -. -.Sh DESCRIPTION -. -. -Version stores the whole content of a directory tree as version -controlled, hashed objects. -. -.Pp -. -This permits backup and restoring the content at any point in the -history, and every file is only backed up once in all and across all -versions. -. -.Pp -. -The files are all copied into the first level of a directory, renamed -to their own SHA-256 hash. -These files are -.Sy objects . -. -.Pp -. -The matching between these files and their original location is also stored -to save the original name of the files. -The files storing this information are -.Sy revisions . -. -.Bl -tag -width indent -. -.It Fl d Ar rev1 rev2 -Diff the changes from -.Ar rev1 -to -.Ar rev2 . -. -.It Fl i -Initialize a new -.Nm -directory at the root of current directory. -. -.It Fl n -New revision is created, saving all modifications form the last saved -revision. -. -.It Fl p Ar Pa tree -Pull the objects from another -.Nm -directory into the current one. -. -.It Fl r Ar rev -Revert the changes to and switch the state to -.Ar rev . -. -.El -. -. -.Sh FILES -. -. -.Bl -tag -width indent -. -.It Pa .v -Main version directory. -The directory in which -.Pa .v -is located is the root version directory. -. -.It Pa .v/obj/ -Directory containing the -.Sy objects -every named after the hash of its content. -. -.It Pa .v/rev/ -Directory containing the -.Sy revisions -which contains the list of files, along with their associated hashes, -in the following format: -. -.Bd -literal -6a2e5ffc2916c10ce723c6866f2680086cef2a1ef0d052b471787adab568bddd ./path/to/file.txt -.Ed -. -.Pp -. -The revisions are also named after their content. -. -.It Pa .v/log -A file containing an history of every revision as a list of name of -revision files, with one revision per line. -. -.El -. -. -.Sh EXAMPLE -. -. -Initialize a new version directory in existing directory -. -.Bd -literal -offset indent -$ cd data/ -$ version -i -.Ed -. -.Pp -. -Create a new revision: -. -.Bd -literal -offset indent -$ version -n -making a new revision -ba49aa8aabb111af9d3837e4fc1a2c4edf91fb092f9093d09a6d7c5fc15e3888 -$ touch test -$ version -n -making a new revision -ba49aa8aabb111af9d3837e4fc1a2c4edf91fb092f9093d09a6d7c5fc15e3888 -9e59e557dad5b2c8b66313a2836afd1970990b885d08e728e6cd5a2a7b7df584 -.Ed -. -.Pp -. -Diffing last two revisions: -. -.Bd -literal -offset indent -$ version -d $(tail -n 2 .v/log) -\&... -.Ed -. -.Pp -. -Find the revision corresponding to a file: -. -.Bd -literal -offset indent -$ grep -rlF path/to/file.txt .v/rev/ -\&.v/rev/9e59e557dad5b2c8b66313a2836afd1970990b885d08e728e6cd5a2a7b7df584 -.Ed diff --git a/man/version.1 b/man/version.1 @@ -0,0 +1,158 @@ +.Dd Apr 4, 2017 +.Dt VERSION 1 +.Os +. +. +.Sh NAME +. +. +.Nm version +.Nd simple version control and backup system +. +. +.Sh SYNOPSIS +. +. +.Nm +.Op Fl i +.Op Fl n +.Op Fl d Ar rev1 rev2 +.Op Fl r Ar rev +.Op Fl p Ar Pa tree +. +. +.Sh DESCRIPTION +. +. +Version stores the whole content of a directory tree as version +controlled, hashed objects. +. +.Pp +. +This permits backup and restoring the content at any point in the +history, and every file is only backed up once in all and across all +versions. +. +.Pp +. +The files are all copied into the first level of a directory, renamed +to their own SHA-256 hash. +These files are +.Sy objects . +. +.Pp +. +The matching between these files and their original location is also stored +to save the original name of the files. +The files storing this information are +.Sy revisions . +. +.Bl -tag -width indent +. +.It Fl d Ar rev1 rev2 +Diff the changes from +.Ar rev1 +to +.Ar rev2 . +. +.It Fl i +Initialize a new +.Nm +directory at the root of current directory. +. +.It Fl n +New revision is created, saving all modifications form the last saved +revision. +. +.It Fl p Ar Pa tree +Pull the objects from the +.Ar Pa tree +.Nm +directory into the current one. +. +.It Fl r Ar rev +Revert the changes to and switch the state to +.Ar rev . +. +.El +. +. +.Sh FILES +. +. +.Bl -tag -width indent +. +.It Pa .v +Main version directory. +The directory in which +.Pa .v +is located is the root version directory. +. +.It Pa .v/obj/ +Directory containing the +.Sy objects +every named after the hash of its content. +. +.It Pa .v/rev/ +Directory containing the +.Sy revisions +which contains the list of files, along with their associated hashes, +in the following format: +. +.Bd -literal +6a2e5ffc2916c10ce723c6866f2680086cef2a1ef0d052b471787adab568bddd ./path/to/file.txt +.Ed +. +.Pp +. +The revisions are also named after their content. +. +.It Pa .v/log +A file containing an history of every revision as a list of name of +revision files, with one revision per line. +. +.El +. +. +.Sh EXAMPLE +. +. +Initialize a new version directory in existing directory +. +.Bd -literal -offset indent +$ cd data/ +$ version -i +.Ed +. +.Pp +. +Create a new revision: +. +.Bd -literal -offset indent +$ version -n +making a new revision +ba49aa8aabb111af9d3837e4fc1a2c4edf91fb092f9093d09a6d7c5fc15e3888 +$ touch test +$ version -n +making a new revision +ba49aa8aabb111af9d3837e4fc1a2c4edf91fb092f9093d09a6d7c5fc15e3888 +9e59e557dad5b2c8b66313a2836afd1970990b885d08e728e6cd5a2a7b7df584 +.Ed +. +.Pp +. +Diffing last two revisions: +. +.Bd -literal -offset indent +$ version -d $(tail -n 2 .v/log) +\&... +.Ed +. +.Pp +. +Find the revision corresponding to a file: +. +.Bd -literal -offset indent +$ grep -rlF path/to/file.txt .v/rev/ +\&.v/rev/9e59e557dad5b2c8b66313a2836afd1970990b885d08e728e6cd5a2a7b7df584 +.Ed diff --git a/man/man1/www-git.1 b/man/www-git.1 diff --git a/man/man1/www-tree.1 b/man/www-tree.1