Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
External
MusicDB-POC
Commits
669e309d
Commit
669e309d
authored
Aug 07, 2021
by
Gary Allen Vollink
Browse files
Fixed for read key from file
parent
4adec00a
Changes
1
Hide whitespace changes
Inline
Side-by-side
musicdb-dump.pl
View file @
669e309d
...
...
@@ -1696,10 +1696,10 @@ MAIN: {
}
}
if
(
-
z
$AppleKey
)
{
if
(
!
length
$AppleKey
)
{
$AppleKey
=
find_apple_key
();
}
if
(
-
z
$AppleKey
)
{
if
(
!
length
$AppleKey
)
{
print
"
No Apple Key, Unable to continue.
\n
";
print
"
- Specify on the command line with --key xxxx
\n
";
print
"
- Store in ~/.apple_key or ./.apple_key
\n
";
...
...
@@ -1754,13 +1754,15 @@ sub find_apple_key
die
(
printf
(
'
Unable to open %s: %s
',
$fn
,
$!
)
);
my
$out
=
q{}
;
while
(
my
$line
=
<
$fh
>
)
{
$line
=~
s/\S//
;
$line
=~
s/\s//g
;
$line
=~
s/^#//g
;
if
(
length
(
$line
)
)
{
$out
=
$line
;
}
}
close
(
$fh
);
if
(
length
(
$out
)
)
{
#print "KEY [$out]\n";
return
$out
;
}
}
...
...
Write
Preview
Supports
Markdown
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