Skip to content

Commit c11fa07

Browse files
committed
need proper packaging for sde installer
1 parent 45190f9 commit c11fa07

File tree

9 files changed

+157
-33
lines changed

9 files changed

+157
-33
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
mulle-todo
2+
publisher-info.sh

.mulle/etc/project/formula-info.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# -- Formula Info --
2+
# If you don't have this file, there will be no homebrew
3+
# formula operations.
4+
#
5+
PROJECT="mulle-todo" # your project/repository name
6+
DESC="📋 A Todo list manager for shell environment"
7+
LANGUAGE="bash" # c,cpp, objc, bash ...
8+
# NAME="${PROJECT}" # formula filename without .rb extension
9+
10+
DEPENDENCIES='${MULLE_NAT_TAP}mulle-bashfunctions
11+
'
12+
13+
DEBIAN_DEPENDENCIES="mulle-bashfunctions (>= 7.0.0)"
14+
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#
2+
# Generate your `def install` `test do` lines here. echo them to stdout.
3+
#
4+
generate_brew_formula_build()
5+
{
6+
local project="$1"
7+
local name="$2"
8+
local version="$3"
9+
10+
cat <<EOF
11+
def install
12+
system "./bin/installer", "#{prefix}"
13+
end
14+
EOF
15+
}

.mulle/etc/project/post-release.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# -- Post Release --
2+
# Push stuff into debian repository
3+
#
4+
5+
post_release()
6+
{
7+
rexekutor mulle-project-debian "$@"
8+
}
9+

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
cmake_minimum_required( VERSION 3.15...99.99)
22

3-
project( mulle-todo VERSION 0.2.0 LANGUAGES NONE)
3+
project( mulle-todo VERSION 0.2.1 LANGUAGES NONE)
44

55
#
66
# Primarily used for packaging on Linux

CMakePackage.cmake

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
##
2+
## THESE SETTINGS ARE IGNORED WHEN USING mulle-project.
3+
## SEE mulle-project/formula-info.sh
4+
##
5+
6+
#
7+
# CPack and project specific stuff
8+
#
9+
######
10+
11+
set( CPACK_PACKAGE_NAME "${PROJECT_NAME}")
12+
set( CPACK_PACKAGE_VERSION "${PROJECT_VERSION}")
13+
set( CPACK_PACKAGE_CONTACT "Nat! <nat@mulle-kybernetik.de>")
14+
set( CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README.md")
15+
set( CPACK_PACKAGE_DESCRIPTION_SUMMARY "📋 A Todo list manager for shell environment")
16+
set( CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE")
17+
set( CPACK_STRIP_FILES false)
18+
19+
# stuff needed for Debian
20+
# memo: its impossible to check for chosen generator here
21+
#
22+
# CPackDeb doesn't produce 100% proper debian file unfortunately
23+
#
24+
set( CPACK_DEBIAN_PACKAGE_HOMEPAGE "https://github.com/mulle-sde/${PROJECT_NAME}")
25+
# not strictly required
26+
27+
set( CPACK_DEBIAN_PACKAGE_DEPENDS "mulle-bashfunctions")
28+
29+
# stuff needed for RPM
30+
31+
set( CPACK_RPM_PACKAGE_VENDOR "Mulle kybernetiK")
32+
33+

RELEASENOTES.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
### 0.2.1
2+
3+
4+
5+
6+
* fix duplicate README.md content
7+
8+
9+
* redo README.md add github workflow
10+
11+
12+
* add promo footer

mulle-todo

Lines changed: 71 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ esac
147147
#
148148
# Versioning of this script
149149
#
150-
MULLE_EXECUTABLE_VERSION="0.2.0"
150+
MULLE_EXECUTABLE_VERSION="0.2.1"
151151

152152

153153
### >> START OF mulle-bashfunctions-embed.sh >>
@@ -628,7 +628,16 @@ _log_vibe()
628628
then
629629
_log_info "$*"
630630
else
631-
_log_verbose "${*//${C_VIBE}/${C_VERBOSE}}"
631+
if [ ${ZSH_VERSION+x} ]
632+
then
633+
local msg="${(j: :)@}"
634+
635+
x="${C_VIBE[3,7]}"
636+
y="${C_VERBOSE[3,7]}"
637+
_log_verbose "${msg//$x/$y}"
638+
else
639+
_log_verbose "${*//${C_VIBE}/${C_VERBOSE}}"
640+
fi
632641
fi
633642
}
634643

@@ -929,21 +938,21 @@ logging_initialize_color()
929938

930939
if [ -z "${NO_COLOR:-}" -a "${MULLE_NO_COLOR:-}" != 'YES' ] && [ ! -f /dev/stderr ]
931940
then
932-
C_RESET="\033[0m"
941+
C_RESET=$'\033'"[0m"
933942

934-
C_RED="\033[0;31m" C_GREEN="\033[0;32m"
935-
C_BLUE="\033[0;34m" C_MAGENTA="\033[0;35m"
936-
C_CYAN="\033[0;36m"
943+
C_RED=$'\033'"[0;31m" C_GREEN=$'\033'"[0;32m"
944+
C_BLUE=$'\033'"[0;34m" C_MAGENTA=$'\033'"[0;35m"
945+
C_CYAN=$'\033'"[0;36m"
937946

938-
C_BR_RED="\033[0;91m"
939-
C_BR_GREEN="\033[0;92m"
940-
C_BR_BLUE="\033[0;94m"
941-
C_BR_CYAN="\033[0;96m"
942-
C_BR_MAGENTA="\033[0;95m"
943-
C_BOLD="\033[1m"
944-
C_FAINT="\033[2m"
945-
C_UNDERLINE="\033[4m"
946-
C_SPECIAL_BLUE="\033[38;5;39;40m"
947+
C_BR_RED=$'\033'"[0;91m"
948+
C_BR_GREEN=$'\033'"[0;92m"
949+
C_BR_BLUE=$'\033'"[0;94m"
950+
C_BR_CYAN=$'\033'"[0;96m"
951+
C_BR_MAGENTA=$'\033'"[0;95m"
952+
C_BOLD=$'\033'"[1m"
953+
C_FAINT=$'\033'"[2m"
954+
C_UNDERLINE=$'\033'"[4m"
955+
C_SPECIAL_BLUE=$'\033'"[38;5;39;40m"
947956

948957
if [ "${MULLE_LOGGING_TRAP:-}" != 'NO' ]
949958
then
@@ -2319,35 +2328,37 @@ _r_prefix_with_unquoted_string()
23192328
local c="$2"
23202329

23212330
local prefix
2322-
local e_prefix
23232331
local head
2332+
local backslashes
2333+
local before
23242334

23252335
head=""
23262336
while :
23272337
do
23282338
prefix="${s%%"${c}"*}" # a${
2329-
if [ "${prefix}" = "${_s}" ]
2339+
if [ "${prefix}" = "${s}" ]
23302340
then
2331-
RVAL=
2341+
RVAL="${head}${s}"
23322342
return 1
23332343
fi
23342344

2335-
e_prefix="${_s%%\\"${c}"*}" # a\\${ or whole string if no match
2336-
if [ "${e_prefix}" = "${_s}" ]
2337-
then
2338-
RVAL="${head}${prefix}"
2339-
return 0
2340-
fi
2345+
before="${prefix}"
2346+
backslashes=0
2347+
while [ ${#before} -gt 0 ] && [ "${before:$(( ${#before} - 1)):1}" = "\\" ]
2348+
do
2349+
backslashes=$((backslashes + 1))
2350+
before="${before%?}"
2351+
done
23412352

2342-
if [ "${#e_prefix}" -gt "${#prefix}" ]
2353+
if [ $((backslashes % 2)) -ne 0 ]
23432354
then
2344-
RVAL="${head}${prefix}"
2345-
return 0
2355+
head="${head}${prefix}${c}"
2356+
s="${s:$(( ${#prefix} + ${#c}))}"
2357+
continue
23462358
fi
23472359

2348-
e_prefix="${e_prefix}\\${c}"
2349-
head="${head}${e_prefix}"
2350-
s="${s:${#e_prefix}}"
2360+
RVAL="${head}${prefix}"
2361+
return 0
23512362
done
23522363
}
23532364

@@ -2373,6 +2384,16 @@ _r_expand_string()
23732384
found=$?
23742385
prefix_opener="${RVAL}" # can be empty
23752386

2387+
if [ ${found} -ne 0 ]
2388+
then
2389+
case "${_s}" in
2390+
*\\\${*)
2391+
RVAL="${head}${prefix_opener}"
2392+
return 0
2393+
;;
2394+
esac
2395+
fi
2396+
23762397
if ! _r_prefix_with_unquoted_string "${_s}" '}'
23772398
then
23782399
if [ ${found} -eq 0 ]
@@ -2384,13 +2405,27 @@ _r_expand_string()
23842405

23852406
else
23862407
prefix_closer="${RVAL}"
2387-
if [ ${found} -ne 0 -o ${#prefix_closer} -lt ${#prefix_opener} ]
2408+
if [ ${found} -ne 0 ]
23882409
then
23892410
_s="${_s:${#prefix_closer}}"
23902411
_s="${_s#\}}"
23912412
RVAL="${head}${prefix_closer}"
23922413
return 0
23932414
fi
2415+
2416+
if [ ${#prefix_closer} -lt ${#prefix_opener} ]
2417+
then
2418+
case "${prefix_opener}" in
2419+
*\\\${*)
2420+
;;
2421+
*)
2422+
_s="${_s:${#prefix_closer}}"
2423+
_s="${_s#\}}"
2424+
RVAL="${head}${prefix_closer}"
2425+
return 0
2426+
;;
2427+
esac
2428+
fi
23942429
fi
23952430

23962431
if [ ${found} -ne 0 ]
@@ -2465,6 +2500,11 @@ function r_expanded_string()
24652500
_r_expand_string
24662501
rval=$?
24672502

2503+
if [ $rval -eq 0 ]
2504+
then
2505+
RVAL="$(printf '%s' "${RVAL}" | sed 's/\\\${/${/g')"
2506+
fi
2507+
24682508
return $rval
24692509
}
24702510

mulle-todo.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
#
4545
# Versioning of this script
4646
#
47-
MULLE_EXECUTABLE_VERSION="0.2.0"
47+
MULLE_EXECUTABLE_VERSION="0.2.1"
4848

4949

5050
### >> START OF mulle-bashfunctions-embed.sh >>

0 commit comments

Comments
 (0)