Skip to content

Commit c6818b6

Browse files
committed
FIXED: bad content in feature properties
1 parent 0fdc6d3 commit c6818b6

File tree

7 files changed

+33
-25
lines changed

7 files changed

+33
-25
lines changed

data/features/clone/clone.dat.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
clone_name="Function clone"
3-
clone_description="Function for `git clone $1`"
3+
clone_description="Function for git clone \$1"
44
clone_version="1.0"
55
clone_tags=("gitbashfunctions")
66
clone_systemcategories=("System" "Utility")
Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,11 @@
1-
Private network search
1+
duckduckgo_name="Duckduckgo"
2+
duckduckgo_description="Duckduckgo opening in Browser"
3+
duckduckgo_version="Google dependent"
4+
duckduckgo_tags=("search" "internet_shortcuts")
5+
duckduckgo_systemcategories=("WebBrowser")
6+
duckduckgo_arguments=("duckduckgo")
7+
8+
duckduckgo_bashfunctions=("silentFunction")
9+
duckduckgo_launcherkeynames=("default")
10+
duckduckgo_default_exec="xdg-open https://duckduckgo.com/"
11+
duckduckgo_description="Opens DuckDuckGo in Chrome
Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1 @@
1-
duckduckgo_name="Duckduckgo"
2-
duckduckgo_description="Duckduckgo opening in Browser"
3-
duckduckgo_version="Google dependent"
4-
duckduckgo_tags=("search" "internet_shortcuts")
5-
duckduckgo_systemcategories=("WebBrowser")
6-
duckduckgo_arguments=("duckduckgo")
7-
8-
duckduckgo_bashfunctions=("silentFunction")
9-
duckduckgo_launcherkeynames=("default")
10-
duckduckgo_default_exec="xdg-open https://duckduckgo.com/"
11-
duckduckgo_description="Opens DuckDuckGo in Chrome"
1+
Private network search

data/features/lolcat/lolcat.dat.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
lolcat_name="Function lolcat"
3-
lolcat_description="Same as the command `cat` but outputting the text in rainbow color and concatenate string"
3+
lolcat_description="Same as the command cat but outputting the text in rainbow color and concatenate string"
44
lolcat_version="System dependent"
55
lolcat_tags=("terminal" "system")
66
lolcat_systemcategories=("System" "Utility")

data/features/nedit/nedit.dat.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
nedit_name="NEdit "Nirvana Text Editor""
2+
nedit_name="NEdit Nirvana Text Editor"
33
nedit_description="Text Editor"
44
nedit_version="System dependent"
55
nedit_tags=("editor" "Customizable" "Scripts" "Powerful")

data/features/templates/templates.dat.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
templates_name="Templates"
3-
templates_description="Different collection of templates for starting code projects: Python3 script (`.py`), Bash script (`.sh`), LaTeX document (`.tex`), C script (`.c`), C header script (`.h`), makefile example (`makefile`) and empty text file (`.txt`)"
3+
templates_description="Different collection of templates for starting code projects: Python3 script (.py), Bash script (.sh), LaTeX document (.tex), C script (.c), C header script (.h), makefile example (makefile) and empty text file (.txt)"
44
templates_version="1.0"
55
templates_tags=("bashfunctions" "terminal")
66
templates_systemcategories=("System" "Utility")

src/core/functions_common.sh

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -237,11 +237,14 @@ append_text()
237237
# - Arguments: Reads the tags property of each feature and maps that feature to a wrapper with the name of each tag.
238238
generate_wrappers()
239239
{
240+
echo hjhasdfhj
240241
declare -Ag wrapper_dict
241242
for feature_name in "${feature_keynames[@]}"; do
243+
echo "feature name: $feature_name"
242244
load_feature_properties "${feature_name}"
245+
echo yes
243246
tags_pointer="${feature_name}_tags[@]"
244-
for tag in "${!tags_pointer}"; do
247+
for tag in ${!tags_pointer}; do
245248
if [[ -v wrapper_dict["${tag}"] ]]; then
246249
wrapper_dict[$tag]+=" ${feature_name}"
247250
else
@@ -250,29 +253,31 @@ generate_wrappers()
250253
done
251254
done
252255

256+
echo hola
253257
for key in $(echo "${!wrapper_dict[@]}" | tr ' ' $'\n' | sort -h); do
254258
echo "Tag: ${key} --- Feature: ${wrapper_dict[$key]}"
255259
done
260+
261+
echo dw
256262
}
257263

258-
# - Description: Generate the list that contains the list of included programs for each wrapper.
264+
# - Description: Load properties from a feature received in the first argument as a keyname
259265
# - Permissions: Can be executed indifferently as root or user.
260-
# - Argument 1: Keyname of the properties to import
261266
load_feature_properties()
262267
{
263268
# Load metadata of the feature if its .dat file exists
264-
if [ -f "${CUSTOMIZER_PROJECT_FOLDER}/data/features/${CURRENT_INSTALLATION_KEYNAME}/${CURRENT_INSTALLATION_KEYNAME}.dat.sh" ]; then
265-
source "${CUSTOMIZER_PROJECT_FOLDER}/data/features/${CURRENT_INSTALLATION_KEYNAME}/${CURRENT_INSTALLATION_KEYNAME}.dat.sh"
269+
if [ -f "${CUSTOMIZER_PROJECT_FOLDER}/data/features/$1/$1.dat.sh" ]; then
270+
source "${CUSTOMIZER_PROJECT_FOLDER}/data/features/$1/$1.dat.sh"
266271

267272
# If we find the property manual_content_available declared, we should import the function file too
268-
local -r manualContentPointer="${CURRENT_INSTALLATION_KEYNAME}_manualcontentavailable"
273+
local -r manualContentPointer="$1_manualcontentavailable"
269274
if [ -n "${!manualContentPointer}" ]; then
270-
if [ -f "${CUSTOMIZER_PROJECT_FOLDER}/data/features/${CURRENT_INSTALLATION_KEYNAME}/${CURRENT_INSTALLATION_KEYNAME}.func.sh" ]; then
271-
source "${CUSTOMIZER_PROJECT_FOLDER}/data/features/${CURRENT_INSTALLATION_KEYNAME}/${CURRENT_INSTALLATION_KEYNAME}.func.sh"
275+
if [ -f "${CUSTOMIZER_PROJECT_FOLDER}/data/features/$1/$1.func.sh" ]; then
276+
source "${CUSTOMIZER_PROJECT_FOLDER}/data/features/$1/$1.func.sh"
272277
fi
273278
fi
274279
else
275-
output_proxy_executioner "Properties of $1 feature have not been loaded. The file ${CUSTOMIZER_PROJECT_FOLDER}/data/features/${CURRENT_INSTALLATION_KEYNAME}/${CURRENT_INSTALLATION_KEYNAME}.dat.sh does not exist" "ERROR"
280+
output_proxy_executioner "Properties of $1 feature have not been loaded. The file ${CUSTOMIZER_PROJECT_FOLDER}/data/features/$1/$1.dat.sh does not exist" "ERROR"
276281
fi
277282
}
278283

@@ -439,6 +444,9 @@ generic_package_manager_override() {
439444
# - Argument 1, 2, 3... : Arguments for the whole program.
440445
argument_processing()
441446
{
447+
generate_wrappers # //debug
448+
exit # //debug
449+
442450
while [ $# -gt 0 ]; do
443451
key="$1"
444452

0 commit comments

Comments
 (0)