Browse Source

Add and demonstrate example ini file

Alois Mahdal 8 years ago
parent
commit
8b64c64b5a
3 changed files with 15 additions and 0 deletions
  1. 1
    0
      mkit.ini
  2. 7
    0
      src/ini.d/main/echo.ini
  3. 7
    0
      src/libexec/satcmd-echo

+ 1
- 0
mkit.ini View File

@@ -51,3 +51,4 @@
51 51
 
52 52
 [files:share]
53 53
     src/shellfu/saturnin.sh     = shellfu/saturnin.sh
54
+    src/ini.d/main/echo.ini     = ini.d/main/echo.ini

+ 7
- 0
src/ini.d/main/echo.ini View File

@@ -0,0 +1,7 @@
1
+
2
+[echo]
3
+
4
+    #
5
+    # default prefix
6
+    #
7
+    prefix = so:

+ 7
- 0
src/libexec/satcmd-echo View File

@@ -1,3 +1,10 @@
1 1
 #!/bin/bash
2 2
 
3
+. "$(shellfu-get path)" || exit 3
4
+
5
+shellfu import inigrep
6
+
7
+SATCMD_ECHO__PREFIX="${SATCMD_ECHO__PREFIX:-$(inigrep -p "echo.prefix")}"
8
+
9
+echo -n "$SATCMD_ECHO__PREFIX"
3 10
 echo "$@"