Browse Source

Rename project to Saturnin

Alois Mahdal 9 years ago
parent
commit
d7e7b6e80d
18 changed files with 82 additions and 46 deletions
  1. 1
    1
      .gitignore
  2. 2
    2
      Makefile
  3. 3
    3
      README
  4. 0
    0
      bin/saturnin-abrt
  5. 27
    0
      bin/saturnin-czrates
  6. 5
    5
      bin/saturnin-dmenu
  7. 1
    1
      bin/saturnin-get
  8. 9
    9
      bin/saturnin-iam
  9. 1
    1
      bin/saturnin-ini.skel
  10. 0
    0
      bin/saturnin-ip
  11. 1
    1
      bin/saturnin-ln
  12. 8
    0
      bin/saturnin-peg
  13. 4
    4
      bin/saturnin-push
  14. 2
    2
      bin/saturnin-revert
  15. 0
    0
      bin/saturnin-watch
  16. 1
    1
      bin/saturnin-www.skel
  17. 2
    2
      config.mk
  18. 15
    14
      setup/mk.sh

+ 1
- 1
.gitignore View File

@@ -1,2 +1,2 @@
1 1
 .autoclean
2
-eecc-*.tar.gz
2
+saturnin-*.tar.gz

+ 2
- 2
Makefile View File

@@ -1,4 +1,4 @@
1
-# eecc - Eclectic Engineer's Control Center
1
+# saturnin - Smart and ready desktop helper
2 2
 # See LICENSE file for copyright and license details.
3 3
 
4 4
 include config.mk
@@ -9,7 +9,7 @@ built.list:
9 9
 	@setup/mk.sh build
10 10
 
11 11
 options:
12
-	@echo eecc build options:
12
+	@echo saturnin build options:
13 13
 	@echo "VERSION  = ${VERSION}"
14 14
 	@echo "PREFIX   = ${PREFIX}"
15 15
 

+ 3
- 3
README View File

@@ -1,4 +1,4 @@
1
-EECC
2
-====
1
+SATURNIN
2
+========
3 3
 
4
-Quality Engineering Control Centre
4
+Smart and ready desktop helper

bin/eeabrt → bin/saturnin-abrt View File


+ 27
- 0
bin/saturnin-czrates View File

@@ -0,0 +1,27 @@
1
+#!/bin/bash
2
+
3
+. <(ffoom init)
4
+
5
+ffoo import core
6
+
7
+uri='https://www.cnb.cz/en/financial_markets/foreign_exchange_market/exchange_rate_fixing/daily.txt'
8
+
9
+get_field() {
10
+    local wntcur=$1
11
+    local wntfld=${2:-Rate}
12
+    local fldn
13
+    case "$wntfld" in
14
+        Country|Currency|Amount|Code|Rate) true;;
15
+        *) usage_is "code Country|Currency|Amount|Code|Rate" ;;
16
+    esac
17
+    local date head
18
+    read date
19
+    read head
20
+    IFS='|'; while read Country Currency Amount Code Rate;
21
+    do
22
+        test "$wntcur" = "$Code" && echo ${!wntfld}
23
+    done
24
+}
25
+
26
+curl --insecure --silent "$uri" \
27
+  | get_field ${1:-USD} Rate

bin/eedmenu → bin/saturnin-dmenu View File

@@ -20,11 +20,11 @@ esac done
20 20
 
21 21
 test -n "$delim"        && maybe_split=do_split
22 22
 
23
-nb="$(eeini -p style.color.nbg)"
24
-nf="$(eeini -p style.color.nfg)"
25
-sb="$(eeini -p style.color.sbg)"
26
-sf="$(eeini -p style.color.sfg)"
27
-fn="$(eeini -p style.font)"
23
+nb="$(saturnin-ini -p style.color.nbg)"
24
+nf="$(saturnin-ini -p style.color.nfg)"
25
+sb="$(saturnin-ini -p style.color.sbg)"
26
+sf="$(saturnin-ini -p style.color.sfg)"
27
+fn="$(saturnin-ini -p style.font)"
28 28
 fn=${fn:--*-terminus-medium-r-*-*-16-*-*-*-*-*-*-*}
29 29
 
30 30
 debug -v nb nf sb sf fn

bin/eeget → bin/saturnin-get View File

@@ -20,7 +20,7 @@ while true; do case $1 in
20 20
     *)              nvrlist=$1;         shift;   break  ;;
21 21
 esac done
22 22
 
23
-test -n "$brewroot" || brewroot=$(eeini -p get.brewroot)
23
+test -n "$brewroot" || brewroot=$(saturnin-ini -p get.brewroot)
24 24
 test -n "$brewroot" || die "specify '-b /path/to/brewroot or get.brewroot in get.ini"
25 25
 test -d "$brewroot" || die "cannot access brewroot: $brewroot"
26 26
 

bin/eeiam → bin/saturnin-iam View File

@@ -45,17 +45,17 @@ familiars_at() {
45 45
     # daemons specific to $1 location plus the rest
46 46
     #
47 47
     test -n "$1" || usagef "location"
48
-    eeini -p iam.running.at.$1
49
-    eeini -p iam.running.at.ANYPLACE
48
+    saturnin-ini -p iam.running.at.$1
49
+    saturnin-ini -p iam.running.at.ANYPLACE
50 50
 }
51 51
 
52 52
 where_i_am() {
53 53
     #
54 54
     # what is my physical location?
55 55
     #
56
-    if=$(eeini -p iam.using.if)
56
+    if=$(saturnin-ini -p iam.using.if)
57 57
     gwmac=$(arp | grep "^gateway\\>.*\\<$if\$" | tr ' ' '\n' | grep :)
58
-    eeini -p iam.seeing.gw.$gwmac || echo OUT
58
+    saturnin-ini -p iam.seeing.gw.$gwmac || echo OUT
59 59
 }
60 60
 
61 61
 start_familiar() {
@@ -64,7 +64,7 @@ start_familiar() {
64 64
     #
65 65
     local f=$1
66 66
     pids_matching $f && return 0
67
-    local like=$(eeini -p iam.starting.like.this.$f)
67
+    local like=$(saturnin-ini -p iam.starting.like.this.$f)
68 68
     debug -v f like
69 69
     if test -n  "$like";
70 70
         then
@@ -78,7 +78,7 @@ set_status() {
78 78
     # set public status $1 by command in ini file
79 79
     #
80 80
     local what=$1
81
-    eeini -p iam.saying.like.this.$what | bash
81
+    saturnin-ini -p iam.saying.like.this.$what | bash
82 82
 }
83 83
 
84 84
 sound_is_muted() {
@@ -137,8 +137,8 @@ i_am_bbl() {
137 137
     # changing language
138 138
     #
139 139
     local cur=$(setxkbmap -v | grep '^symbols: ' | cut -d+ -f2)
140
-    local all="$(eeini    -p iam.typing.lang)"
141
-    local def="$(eeini -1 -p iam.typing.lang)"
140
+    local all="$(saturnin-ini    -p iam.typing.lang)"
141
+    local def="$(saturnin-ini -1 -p iam.typing.lang)"
142 142
     local nxt=$(
143 143
         echo -e "$all\n$all" \
144 144
           | grep -m 1 -A 1 $cur \
@@ -154,7 +154,7 @@ i_am_bbldone() {
154 154
     #
155 155
     # changing language back to normal
156 156
     #
157
-    setxkbmap "$(eeini -1 -p iam.typing.lang)"
157
+    setxkbmap "$(saturnin-ini -1 -p iam.typing.lang)"
158 158
 }
159 159
 
160 160
 i_am_deaf() {

bin/eeini.skel → bin/saturnin-ini.skel View File

@@ -1,7 +1,7 @@
1 1
 #!/bin/bash
2 2
 
3 3
 . <(ffoom init)
4
-FFOO_INI_PATH="__EECC_INI_PATH__:$EECC_INI_PATH"
4
+FFOO_INI_PATH="__SATURNIN_INI_PATH__:$SATURNIN_INI_PATH"
5 5
 
6 6
 ffoo import ini
7 7
 

bin/eeip → bin/saturnin-ip View File


bin/eeln → bin/saturnin-ln View File

@@ -41,7 +41,7 @@ link() {
41 41
 }
42 42
 
43 43
 load() {
44
-    eeini -p ln.dir.$1 | expand_tilde | debug_pipe out
44
+    saturnin-ini -p ln.dir.$1 | expand_tilde | debug_pipe out
45 45
 }
46 46
 
47 47
 while true; do case $1 in

+ 8
- 0
bin/saturnin-peg View File

@@ -0,0 +1,8 @@
1
+#!/bin/bash
2
+
3
+. <(ffoom init)
4
+
5
+ffoo import core
6
+ffoo import proj_pegasus
7
+
8
+$*

bin/eepush → bin/saturnin-push View File

@@ -5,7 +5,7 @@
5 5
 ffoo import core
6 6
 ffoo import recon
7 7
 
8
-ORDER="$(eeini -p push.options.order)"
8
+ORDER="$(saturnin-ini -p push.options.order)"
9 9
 
10 10
 while true; do case $1 in
11 11
     -d|--debug)     FFOO_DEBUG=true;    shift;      ;;
@@ -17,11 +17,11 @@ while true; do case $1 in
17 17
     *)              hosts="$1"; shift;              ;;
18 18
 esac done
19 19
 
20
-test -n "$hosts" || hosts=$(eeini -s push.hosts | debug_pipe ini_hosts)
20
+test -n "$hosts" || hosts=$(saturnin-ini -s push.hosts | debug_pipe ini_hosts)
21 21
 debug -v hosts
22 22
 
23 23
 test -n "$hosts" || die "no valid hosts to begin with"
24
-paths=$(eeini -s push.paths)
24
+paths=$(saturnin-ini -s push.paths)
25 25
 test -n "$paths" || die "no valid paths to begin with"
26 26
 
27 27
 think "Probing & sorting paths"
@@ -79,7 +79,7 @@ esac
79 79
 
80 80
 for host in $hosts;
81 81
 do
82
-    eeini -s push.commands \
82
+    saturnin-ini -s push.commands \
83 83
       | grep . \
84 84
       | while read cmd;
85 85
         do

bin/eerevert → bin/saturnin-revert View File

@@ -52,11 +52,11 @@ snapshot="$2"
52 52
 
53 53
 test -z "$snapshot" && {
54 54
     think "looking for $domain in revert.ini"
55
-    snapshot=$(eeini -1 -p revert.to.snapshot.$domain)
55
+    snapshot=$(saturnin-ini -1 -p revert.to.snapshot.$domain)
56 56
 }
57 57
 test -z "$snapshot" && {
58 58
     think "looking for default snapshot name in revert.ini"
59
-    snapshot=$(eeini -1 -p revert.to.snapshot._default_)
59
+    snapshot=$(saturnin-ini -1 -p revert.to.snapshot._default_)
60 60
 }
61 61
 test -z "$snapshot" && {
62 62
     die "could not determine snapshot for $domain"

bin/eewatch → bin/saturnin-watch View File


bin/eewww.skel → bin/saturnin-www.skel View File

@@ -1,7 +1,7 @@
1 1
 #!/bin/bash
2 2
 
3 3
 . <(ffoom init)
4
-FFOO_INI_PATH="__EECC_INI_PATH__"   # needed for www.find_uri
4
+FFOO_INI_PATH="__SATURNIN_INI_PATH__"   # needed for www.find_uri
5 5
 
6 6
 ffoo import ini
7 7
 ffoo import www

+ 2
- 2
config.mk View File

@@ -3,5 +3,5 @@ VERSION = 0.0.0
3 3
 STAGE = devel
4 4
 PREFIX = /usr/local
5 5
 MANPREFIX = ${PREFIX}/share/man
6
-EECC_INI_PATH_GLOBAL = /etc/eecc
7
-EECC_INI_PATH_USER = .eecc
6
+SATURNIN_INI_PATH_GLOBAL = /etc/saturnin
7
+SATURNIN_INI_PATH_USER = .saturnin

+ 15
- 14
setup/mk.sh View File

@@ -1,5 +1,5 @@
1 1
 #!/bin/bash
2
-# eecc - Eclectic Engineer's Control Center
2
+# saturnin - Smart and ready desktop helper
3 3
 # See LICENSE file for copyright and license details.
4 4
 
5 5
 tmp=$(mktemp)
@@ -10,17 +10,18 @@ rm -f $tmp
10 10
 bindir=${DESTDIR}${PREFIX}/bin
11 11
 
12 12
 list_of_bins() {
13
-    echo bin/eeabrt
14
-    echo bin/eedmenu
15
-    echo bin/eeget
16
-    echo bin/eeiam
17
-    echo bin/eeini
18
-    echo bin/eeip
19
-    echo bin/eeln
20
-    echo bin/eepush
21
-    echo bin/eerevert
22
-    echo bin/eewatch
23
-    echo bin/eewww
13
+    echo bin/saturnin-abrt
14
+    echo bin/saturnin-czrates
15
+    echo bin/saturnin-dmenu
16
+    echo bin/saturnin-get
17
+    echo bin/saturnin-iam
18
+    echo bin/saturnin-ini
19
+    echo bin/saturnin-ip
20
+    echo bin/saturnin-ln
21
+    echo bin/saturnin-push
22
+    echo bin/saturnin-revert
23
+    echo bin/saturnin-watch
24
+    echo bin/saturnin-www
24 25
 }
25 26
 
26 27
 list_of_installed_bins() {
@@ -37,7 +38,7 @@ build1() {
37 38
     srcpath=$1
38 39
     dstpath=${srcpath%.skel}
39 40
     perl -pe "
40
-        s|__EECC_INI_PATH__|$EECC_INI_PATH_GLOBAL:\\\$HOME/$EECC_INI_PATH_USER|;
41
+        s|__SATURNIN_INI_PATH__|$SATURNIN_INI_PATH_GLOBAL:\\\$HOME/$SATURNIN_INI_PATH_USER|;
41 42
         s|__VERSION__|$(get_version)|;
42 43
     " < $srcpath > $dstpath
43 44
     echo $dstpath >> built.list
@@ -61,7 +62,7 @@ clean() {
61 62
 
62 63
 dist() {
63 64
     local version=$(get_version)
64
-    local dirname=eecc-$version
65
+    local dirname=saturnin-$version
65 66
     mkdir -p $dirname
66 67
     cp -R   bin \
67 68
             config.mk \