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
Vladislav
PortWINE
Commits
c08f0142
Unverified
Commit
c08f0142
authored
Jul 20, 2024
by
Vladislav
Committed by
Boris Yumankulov
Jul 21, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added numbering for duplicates and determining their uniqueness
parent
42dfd9c8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
7 deletions
+22
-7
functions_helper
data_from_portwine/scripts/functions_helper
+22
-7
No files found.
data_from_portwine/scripts/functions_helper
View file @
c08f0142
...
...
@@ -1009,7 +1009,7 @@ stop_portwine () {
for
dir
in
"
${
DESKTOP_DIRS
[@]
}
"
;
do
while
IFS
=
read
-r
-d
''
link_file
;
do
LINKS+
=(
"
$link_file
"
)
done
< <
(
find
"
$dir
"
-type
f
-iname
"*.lnk"
${
SHORTCUT_SKIP_LIST_NEW
}
-print0
2>/dev/null |
sort
-u
)
done
< <
(
find
"
$dir
"
-type
f
-iname
"*.lnk"
-print0
2>/dev/null |
sort
-u
)
done
for
link_file
in
"
${
LINKS
[@]
}
"
;
do
...
...
@@ -1048,7 +1048,7 @@ stop_portwine () {
else
create_shortcut_from_link
if
[[
"
${
SHORTCUT_DUBLICATE
}
"
==
"true"
]]
;
then
print_info
"Created link for dublicate:
$link_name
-
$prefix_name
"
print_info
"Created link for dublicate:
$link_name
-
$prefix_name
[
$number_dublication
]
"
else
print_info
"Created link for:
$link_name
"
fi
...
...
@@ -1371,15 +1371,30 @@ create_shortcut_from_link () {
fi
fi
rm
-f
"
${
link_file
}
"
if
[[
-f
"
${
PORT_WINE_PATH
}
/
${
PORTPROTON_NAME
}
.desktop"
]]
;
then
create_new_dir
"
${
PORT_WINE_PATH
}
/dublicate"
PW_NAME_DESKTOP
=
"
${
PORT_WINE_PATH
}
/dublicate/
${
PORTPROTON_NAME
}
-
${
prefix_name
}
.desktop"
export
SHORTCUT_DUBLICATE
=
"true"
if
!
grep
-i
"
${
exe_path
}
"
"
${
PORT_WINE_PATH
}
/
${
PORTPROTON_NAME
}
.desktop"
&>/dev/null
;
then
create_new_dir
"
${
PORT_WINE_PATH
}
/dublicate"
SHORTCUT_DUBLICATE
=
"true"
number_dublication
=
"1"
if
[[
-f
"
${
PORT_WINE_PATH
}
/dublicate/
${
PORTPROTON_NAME
}
-
${
prefix_name
}
[
$number_dublication
].desktop"
]]
;
then
number_dublication
=
"
$(
ls
"
${
PORT_WINE_PATH
}
/dublicate"
/ 2>/dev/null
)
"
number_dublication
=
"
${
number_dublication
//*[/
}
"
number_dublication
=
"
${
number_dublication
//]*/
}
"
if
!
grep
-i
"
${
exe_path
}
"
"
${
PORT_WINE_PATH
}
/dublicate/
${
PORTPROTON_NAME
}
-
${
prefix_name
}
[
$number_dublication
].desktop"
&>/dev/null
;
then
number_dublication
=
"
$((
$number_dublication
+
1
))
"
else
exit
0
fi
fi
PW_NAME_DESKTOP
=
"
${
PORT_WINE_PATH
}
/dublicate/
${
PORTPROTON_NAME
}
-
${
prefix_name
}
[
$number_dublication
].desktop"
else
exit
0
fi
else
PW_NAME_DESKTOP
=
"
${
PORT_WINE_PATH
}
/
${
PORTPROTON_NAME
}
.desktop"
export
SHORTCUT_DUBLICATE
=
""
SHORTCUT_DUBLICATE
=
""
fi
rm
-f
"
${
link_file
}
"
echo
"[Desktop Entry]"
>
"
${
PW_NAME_DESKTOP
}
"
echo
"Name=
${
PORTPROTON_NAME
}
"
>>
"
${
PW_NAME_DESKTOP
}
"
...
...
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