Skip to content
Snippets Groups Projects
Commit a0d4f756 authored by Bob Mottram's avatar Bob Mottram
Browse files

Add logging

parent 622c47eb
No related branches found
No related tags found
No related merge requests found
......@@ -44,21 +44,28 @@ function android_update_apps {
echo '{' > "$plinth_api"
echo ' "shortcuts": [' >> "$plinth_api"
echo 'android app' > /var/log/androidapp.log
android_ctr=0
app_index=0
# shellcheck disable=SC2068
for a in ${APPS_INSTALLED[@]}
do
echo "Starting app ${APPS_INSTALLED_NAMES[$app_index]}" >> /var/log/androidapp.log
if [[ "$a" == "1" ]]; then
app_name=${APPS_INSTALLED_NAMES[$app_index]}
echo "App installed $app_name" >> /var/log/androidapp.log
app_filename="/usr/share/${PROJECT_NAME}/apps/${PROJECT_NAME}-app-${app_name}"
if [ -f "$app_filename" ]; then
echo "File exists $app_filename" >> /var/log/androidapp.log
# 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"
echo "icon copied" >> /var/log/androidapp.log
else
icon_filename=
echo "icon not copied" >> /var/log/androidapp.log
fi
app_name_upper=$(echo "$app_name" | awk '{print toupper($0)}')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment