Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
PortWINE
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Mikhail Tergoev
PortWINE
Commits
60cb745f
Commit
60cb745f
authored
Oct 25, 2024
by
Vladislav
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes
parent
0f710f98
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
18 deletions
+14
-18
functions_helper
data_from_portwine/scripts/functions_helper
+14
-18
No files found.
data_from_portwine/scripts/functions_helper
View file @
60cb745f
...
...
@@ -38,28 +38,28 @@ print_wrapped () {
}
export
-f
print_wrapped
make_a
bbreviation
()
{
local
words
new_word
i
make_a
cronym
()
{
local
words
acronym
i
words
=(
$1
)
# Создаем новое слово, состоящее из начальных букв слов
new_word
=
"
${
words
[0]
:0:1
}
"
acronym
=
"
${
words
[0]
:0:1
}
"
for
((
i
=
1
;
i<
${#
words
[@]
}
;
i++
))
;
do
new_word
+
=
"
${
words
[
$i
]
:0:1
}
"
acronym
+
=
"
${
words
[
$i
]
:0:1
}
"
done
echo
"
$
new_word
"
echo
"
$
acronym
"
}
export
-f
make_a
bbreviation
export
-f
make_a
cronym
make_a
cronym
()
{
local
word a
cronym
i
make_a
bbreviation
()
{
local
word a
bbreviation
i
word
=
$1
for
((
i
=
0
;
i<
${#
word
}
;
i++
))
;
do
if
[[
${
word
:
$i
:1
}
=
~ ^[A-Z]
$
]]
;
then
a
cronym
+
=
"
${
word
:
$i
:1
}
"
a
bbreviation
+
=
"
${
word
:
$i
:1
}
"
fi
done
echo
"
$a
cronym
"
echo
"
$a
bbreviation
"
}
export
-f
make_abbreviation
check_variables
()
{
[[
-z
${
!1
}
]]
&&
export
$1
=
"
$2
"
;
}
...
...
@@ -960,19 +960,15 @@ create_name_desktop () {
if [[ -n
$DESKTOP_NAME_FILE
]] ; then
PW_NAME_DESKTOP_PROXY="
$DESKTOP_NAME_FILE
"
elif [[ -n
$DESKTOP_NAME_FILE_OLD
]] ; then
elif [[ -n
$DESKTOP_NAME_FILE_OLD
&&
${
PORTWINE_DB_DESKTOP
^^
}
=~
${
DESKTOP_NAME_FILE_OLD
^^
}
]] ; then
PW_NAME_DESKTOP_PROXY="
$DESKTOP_NAME_FILE_OLD
"
elif [[ -n
$PORTPROTON_NAME
&&
${
PORTPROTON_NAME
^^
}
=~
${
PORTWINE_DB_DESKTOP
^^
}
&&
$PORTPROTON_NAME
!= "
$PORTWINE_DB_DESKTOP
" ]]
\
|| [[ -n
$PORTPROTON_NAME
&&
${#
PORTPROTON_NAME_ABBR
}
-gt 2 &&
${
PORTPROTON_NAME_ABBR
^^
}
=~
${
PORTWINE_DB_DESKTOP
^^
}
]]
\
|| [[ -n
$PORTPROTON_NAME
&&
${#
PORTPROTON_NAME_ACRO
}
-gt 2 &&
${
PORTPROTON_NAME_ACRO
^^
}
=~
${
PORTWINE_DB_DESKTOP
^^
}
]]
\
|| [[ -n
$PORTPROTON_NAME
&&
${#
PORTPROTON_NAME_ABBR
}
-gt 2 &&
${
PORTWINE_DB_DESKTOP
^^
}
=~
${
PORTPROTON_NAME_ABBR
^^
}
]]
\
|| [[ -n
$PORTPROTON_NAME
&&
${#
PORTPROTON_NAME_ABBR
}
-gt 2 &&
${
PORTWINE_DB_DESKTOP
^^
}
=~
$PORTPROTON_NAME_ABBR
]]
\
|| [[ -n
$PORTPROTON_NAME
&&
${#
PORTPROTON_NAME_ACRO
}
-gt 2 &&
${
PORTWINE_DB_DESKTOP
^^
}
=~
${
PORTPROTON_NAME_ACRO
^^
}
]]
then
PW_NAME_DESKTOP_PROXY="
$PORTPROTON_NAME
"
elif [[ -n
$FILE_DESCRIPTION
&&
${
FILE_DESCRIPTION
^^
}
=~
${
PORTWINE_DB_DESKTOP
^^
}
&&
$FILE_DESCRIPTION
!= "
$PORTWINE_DB_DESKTOP
" ]]
\
|| [[ -n
$FILE_DESCRIPTION
&&
${#
FILE_DESCRIPTION_ABBR
}
-gt 2 &&
${
FILE_DESCRIPTION_ABBR
^^
}
=~
${
PORTWINE_DB_DESKTOP
^^
}
]]
\
|| [[ -n
$FILE_DESCRIPTION
&&
${#
FILE_DESCRIPTION_ACRO
}
-gt 2 &&
${
FILE_DESCRIPTION_ACRO
^^
}
=~
${
PORTWINE_DB_DESKTOP
^^
}
]]
\
|| [[ -n
$FILE_DESCRIPTION
&&
${#
FILE_DESCRIPTION_ABBR
}
-gt 2 &&
${
PORTWINE_DB_DESKTOP
^^
}
=~
${
FILE_DESCRIPTION_ABBR
^^
}
]]
\
|| [[ -n
$FILE_DESCRIPTION
&&
${#
FILE_DESCRIPTION_ABBR
}
-gt 2 &&
${
PORTWINE_DB_DESKTOP
^^
}
=~
$FILE_DESCRIPTION_ABBR
]]
\
|| [[ -n
$FILE_DESCRIPTION
&&
${#
FILE_DESCRIPTION_ACRO
}
-gt 2 &&
${
PORTWINE_DB_DESKTOP
^^
}
=~
${
FILE_DESCRIPTION_ACRO
^^
}
]]
then
PW_NAME_DESKTOP_PROXY="
$FILE_DESCRIPTION
"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment