Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
freedombone
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Context Sensitive Group
freedombone
Commits
28df63ff
Commit
28df63ff
authored
6 years ago
by
Bob Mottram
Browse files
Options
Downloads
Patches
Plain Diff
Generalize absence from android api
parent
2152a711
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/freedombone-app-pihole
+1
-0
1 addition, 0 deletions
src/freedombone-app-pihole
src/freedombone-template
+1
-0
1 addition, 0 deletions
src/freedombone-template
src/freedombone-utils-android
+86
-86
86 additions, 86 deletions
src/freedombone-utils-android
with
88 additions
and
86 deletions
src/freedombone-app-pihole
+
1
−
0
View file @
28df63ff
...
...
@@ -35,6 +35,7 @@ IN_DEFAULT_INSTALL=0
SHOW_ON_ABOUT=0
SHOW_CLEARNET_ADDRESS_ON_ABOUT=0
SHOW_DOMAIN_IN_WEBADMIN=0
NOT_ON_API=1
PIHOLE_IFACE=eth0
PIHOLE_DNS1='91.239.100.100'
...
...
This diff is collapsed.
Click to expand it.
src/freedombone-template
+
1
−
0
View file @
28df63ff
...
...
@@ -267,6 +267,7 @@ fi
echo
''
echo
'# whether to show the domain name in the web UI'
echo
'SHOW_DOMAIN_IN_WEBADMIN=1'
echo
'NOT_ON_API=0'
echo
''
echo
"
${
app_name_upper
}
_DOMAIN_NAME="
echo
"
${
app_name_upper
}
_CODE="
...
...
This diff is collapsed.
Click to expand it.
src/freedombone-utils-android
+
86
−
86
View file @
28df63ff
...
...
@@ -61,108 +61,108 @@ function android_update_apps {
do
app_name
=
${
APPS_INSTALLED_NAMES
[
$app_index
]
}
if
[[
"
$app_name
"
==
'pihole'
]]
;
then
app_name
=
fi
if
[
"
$app_name
"
]
;
then
app_filename
=
"/usr/share/
${
PROJECT_NAME
}
/apps/
${
PROJECT_NAME
}
-app-
${
app_name
}
"
if
[
-f
"
$app_filename
"
]
;
then
# get the icon for the app
icon_filename
=
"/usr/share/
${
PROJECT_NAME
}
/android-app/
${
app_name
}
.png"
if
[
-f
"
$icon_filename
"
]
;
then
cp
"
$icon_filename
"
"/var/www/
${
local_hostname
}
/htdocs/icons/
${
app_name
}
.png"
else
icon_filename
=
fi
app_name_upper
=
$(
echo
"
$app_name
"
|
awk
'{print toupper($0)}'
)
SHORT_DESCRIPTION
=
DESCRIPTION
=
MOBILE_APP_URL
=
if
!
grep
-q
'NOT_ON_API=1'
"
$app_filename
"
;
then
if
!
grep
-q
"
${
app_name_upper
}
_SHORT_DESCRIPTION="
"
$app_filename
"
;
then
app_index
=
$((
app_index+1
))
continue
fi
if
grep
-q
"#
${
app_name_upper
}
_SHORT_DESCRIPTION="
"
$app_filename
"
;
then
app_index
=
$((
app_index+1
))
continue
fi
SHORT_DESCRIPTION
=
"
$(
grep
"
${
app_name_upper
}
_SHORT_DESCRIPTION="
"
$app_filename
"
|
head
-n
1 |
sed
's|\$||g'
|
sed
"s|'||g"
|
sed
's|\"||g'
|
awk
-F
'='
'{print $2}'
)
"
translated_short_description
=
$(
web_admin_translate_text
"
$SHORT_DESCRIPTION
"
)
SHORT_DESCRIPTION
=
"
$translated_short_description
"
if
grep
-q
"
${
app_name_upper
}
_DESCRIPTION="
"
$app_filename
"
;
then
DESCRIPTION
=
"
$(
grep
"
${
app_name_upper
}
_DESCRIPTION="
"
$app_filename
"
|
head
-n
1 |
sed
's|\$||g'
|
sed
"s|'||g"
|
sed
's|\"||g'
|
awk
-F
'='
'{print $2}'
)
"
translated_description
=
$(
web_admin_translate_text
"
$DESCRIPTION
"
)
DESCRIPTION
=
"
$translated_description
"
fi
if
grep
-q
"
${
app_name_upper
}
_MOBILE_APP_URL="
"
$app_filename
"
;
then
MOBILE_APP_URL
=
"
$(
grep
"
${
app_name_upper
}
_MOBILE_APP_URL="
"
$app_filename
"
|
head
-n
1 |
sed
's|\$||g'
|
sed
's|\$||g'
|
sed
"s|'||g"
|
sed
's|\"||g'
|
awk
-F
'='
'{print $2}'
)
"
fi
# get the icon for the app
icon_filename
=
"/usr/share/
${
PROJECT_NAME
}
/android-app/
${
app_name
}
.png"
if
[
-f
"
$icon_filename
"
]
;
then
cp
"
$icon_filename
"
"/var/www/
${
local_hostname
}
/htdocs/icons/
${
app_name
}
.png"
else
icon_filename
=
fi
if
[
$android_ctr
-gt
0
]
;
then
echo
','
>>
"
$plinth_api
"
fi
app_name_upper
=
$(
echo
"
$app_name
"
|
awk
'{print toupper($0)}'
)
SHORT_DESCRIPTION
=
DESCRIPTION
=
MOBILE_APP_URL
=
{
echo
' {'
;
echo
"
\"
name
\"
:
\"
${
app_name
}
\"
,"
;
echo
"
\"
short_description
\"
:
\"
$SHORT_DESCRIPTION
\"
,"
;
echo
"
\"
description
\"
: ["
;
echo
"
\"
$DESCRIPTION
\"
"
;
echo
' ],'
;
echo
"
\"
icon_url
\"
:
\"
/icons/
${
app_name
}
.png
\"
,"
;
echo
"
\"
clients
\"
: ["
;
}
>>
"
$plinth_api
"
read_config_param
"
${
app_name_upper
}
_DOMAIN_NAME"
test_domain_name
=
"
${
app_name_upper
}
_DOMAIN_NAME"
domain_name
=
${
!test_domain_name
}
if
[
"
$domain_name
"
]
;
then
if
[[
"
$domain_name
"
!=
*
'.onion'
]]
;
then
domain_name
=
"https://
${
!test_domain_name
}
"
else
domain_name
=
"http://
${
!test_domain_name
}
"
if
!
grep
-q
"
${
app_name_upper
}
_SHORT_DESCRIPTION="
"
$app_filename
"
;
then
app_index
=
$((
app_index+1
))
continue
fi
if
grep
-q
"#
${
app_name_upper
}
_SHORT_DESCRIPTION="
"
$app_filename
"
;
then
app_index
=
$((
app_index+1
))
continue
fi
SHORT_DESCRIPTION
=
"
$(
grep
"
${
app_name_upper
}
_SHORT_DESCRIPTION="
"
$app_filename
"
|
head
-n
1 |
sed
's|\$||g'
|
sed
"s|'||g"
|
sed
's|\"||g'
|
awk
-F
'='
'{print $2}'
)
"
translated_short_description
=
$(
web_admin_translate_text
"
$SHORT_DESCRIPTION
"
)
SHORT_DESCRIPTION
=
"
$translated_short_description
"
if
grep
-q
"
${
app_name_upper
}
_DESCRIPTION="
"
$app_filename
"
;
then
DESCRIPTION
=
"
$(
grep
"
${
app_name_upper
}
_DESCRIPTION="
"
$app_filename
"
|
head
-n
1 |
sed
's|\$||g'
|
sed
"s|'||g"
|
sed
's|\"||g'
|
awk
-F
'='
'{print $2}'
)
"
translated_description
=
$(
web_admin_translate_text
"
$DESCRIPTION
"
)
DESCRIPTION
=
"
$translated_description
"
fi
if
grep
-q
"
${
app_name_upper
}
_MOBILE_APP_URL="
"
$app_filename
"
;
then
MOBILE_APP_URL
=
"
$(
grep
"
${
app_name_upper
}
_MOBILE_APP_URL="
"
$app_filename
"
|
head
-n
1 |
sed
's|\$||g'
|
sed
's|\$||g'
|
sed
"s|'||g"
|
sed
's|\"||g'
|
awk
-F
'='
'{print $2}'
)
"
fi
fi
if
[[
"
$domain_name
"
&&
"
$app_name
"
!=
'matrix'
]]
;
then
{
echo
' {'
;
echo
"
\"
name
\"
:
\"
${
app_name
}
\"
,"
;
echo
"
\"
platforms
\"
: ["
;
echo
' {'
;
echo
' "type": "web",'
;
echo
"
\"
url
\"
:
\"
$domain_name
\"
"
;
echo
-n
' }'
;
}
>>
"
$plinth_api
"
fi
if
[
"
$MOBILE_APP_URL
"
]
;
then
if
[[
"
$domain_name
"
&&
"
$app_name
"
!=
'matrix'
]]
;
then
if
[
$android_ctr
-gt
0
]
;
then
echo
','
>>
"
$plinth_api
"
else
fi
{
echo
' {'
;
echo
"
\"
name
\"
:
\"
${
app_name
}
\"
,"
;
echo
"
\"
short_description
\"
:
\"
$SHORT_DESCRIPTION
\"
,"
;
echo
"
\"
description
\"
: ["
;
echo
"
\"
$DESCRIPTION
\"
"
;
echo
' ],'
;
echo
"
\"
icon_url
\"
:
\"
/icons/
${
app_name
}
.png
\"
,"
;
echo
"
\"
clients
\"
: ["
;
}
>>
"
$plinth_api
"
read_config_param
"
${
app_name_upper
}
_DOMAIN_NAME"
test_domain_name
=
"
${
app_name_upper
}
_DOMAIN_NAME"
domain_name
=
${
!test_domain_name
}
if
[
"
$domain_name
"
]
;
then
if
[[
"
$domain_name
"
!=
*
'.onion'
]]
;
then
domain_name
=
"https://
${
!test_domain_name
}
"
else
domain_name
=
"http://
${
!test_domain_name
}
"
fi
fi
if
[[
"
$domain_name
"
&&
"
$app_name
"
!=
'matrix'
]]
;
then
{
echo
' {'
;
echo
"
\"
name
\"
:
\"
${
app_name
}
\"
,"
;
echo
"
\"
platforms
\"
: ["
;
}
>>
"
$plinth_api
"
echo
"
\"
platforms
\"
: ["
;
echo
' {'
;
echo
' "type": "web",'
;
echo
"
\"
url
\"
:
\"
$domain_name
\"
"
;
echo
-n
' }'
;
}
>>
"
$plinth_api
"
fi
store_name
=
'f-droid'
if
[[
"
$MOBILE_APP_URL
"
==
*
'google'
*
]]
;
then
store_name
=
'google-play'
if
[
"
$MOBILE_APP_URL
"
]
;
then
if
[[
"
$domain_name
"
&&
"
$app_name
"
!=
'matrix'
]]
;
then
echo
','
>>
"
$plinth_api
"
else
{
echo
' {'
;
echo
"
\"
name
\"
:
\"
${
app_name
}
\"
,"
;
echo
"
\"
platforms
\"
: ["
;
}
>>
"
$plinth_api
"
fi
store_name
=
'f-droid'
if
[[
"
$MOBILE_APP_URL
"
==
*
'google'
*
]]
;
then
store_name
=
'google-play'
fi
{
echo
' {'
;
echo
' "type": "store",'
;
echo
' "os": "android",'
;
echo
"
\"
store_name
\"
:
\"
$store_name
\"
,"
;
echo
"
\"
url
\"
:
\"
$MOBILE_APP_URL
\"
"
;
echo
' }'
;
}
>>
"
$plinth_api
"
else
echo
''
>>
"
$plinth_api
"
fi
{
echo
' {'
;
echo
' "type": "store",'
;
echo
' "os": "android",'
;
echo
"
\"
store_name
\"
:
\"
$store_name
\"
,"
;
echo
"
\"
url
\"
:
\"
$MOBILE_APP_URL
\"
"
;
echo
' }'
;
}
>>
"
$plinth_api
"
else
echo
''
>>
"
$plinth_api
"
fi
{
echo
' ]'
;
echo
' }'
;
echo
' ]'
;
echo
-n
' }'
;
}
>>
"
$plinth_api
"
{
echo
' ]'
;
echo
' }'
;
echo
' ]'
;
echo
-n
' }'
;
}
>>
"
$plinth_api
"
android_ctr
=
$((
android_ctr+1
))
android_ctr
=
$((
android_ctr+1
))
fi
fi
fi
app_index
=
$((
app_index+1
))
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment