Changeset 3 in code


Ignore:
Timestamp:
Oct 11, 2022, 5:38:29 PM (3 years ago)
Author:
koizumi.aoi
Message:

Added initialization script, added error checking on kanako, update
manual page.

Signed-off-by: Aoi K <koizumi.aoi@…>

Location:
trunk
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/kanako

    r2 r3  
    55store_dir=${store_dir:-$HOME/.kanako-store}
    66
    7 cd ${store_dir} || exit 1
     7if test -d ${store_dir}; then
     8        cd ${store_dir}
     9else
     10        echo "Password store not found!"
     11        echo "Please run kanako-init"
     12        exit 1
     13fi
    814
    9 . ${conf_dir}/kanako.conf
     15if test -f ${conf_dir}/kanako.conf; then
     16        . ${conf_dir}/kanako.conf;
     17else
     18        echo "Configuration file has not been found!"
     19        echo "Copy kanako.conf.example from the repository,"
     20        echo "and edit accordingly."
     21        exit 1
     22fi
    1023
    1124fn_copy() {
     
    5063Usage:
    5164ayu [-ceglnrRv] <arguments>
    52 ayu [copy|edit|generate|list|add|trash|trashdir|view] <arguments>
     65ayu [copy|edit|gen|list|add|trash|trashd|view] <arguments>
    5366EOF
    5467}
     
    5770    -c | copy) fn_copy $2 ;;
    5871    -e | edit) fn_edit $2 ;;
    59     -g | generate) fn_generate $2 ;;
     72    -g | gen) fn_generate $2 ;;
    6073    -l | list) fn_list ;;
    6174    -n | add) fn_new $2 ;;
  • trunk/kanako.mdoc

    r2 r3  
    1515.It edit, -e
    1616Edit an entry
    17 .It generate, -g
     17.It gen, -g
    1818Generate a random password
    1919.It list, -l
    2020List all entries
    21 .It del, -r
     21.It trash, -r
    2222Remove single entries
    23 .It delr, -R
     23.It trashd, -R
    2424Remove recursively a directory w/ entries
    2525.It view, -v
  • trunk/mkfile

    r2 r3  
    55        install -Dm0644 kanako.mdoc $PREFIX/share/man/man1/kanako.1
    66        install -Dm0644 kanako.conf.mdoc $PREFIX/share/man/man5/kanako.conf.5
     7        install -Dm0755 kanako-init $PREFIX/bin/kanako-init
    78uninstall:
    89        rm -f $PREFIX/bin/kanako $PREFIX/share/man/man1/kanako.1 $PREFIX/share/man/man5/kanako.conf.5
Note: See TracChangeset for help on using the changeset viewer.