File: android-deltas-sync/_etc/bash-version/z-postcopy-hook-phone.sh
################################################################# # Post to-phone-propagation steps: EDIT ME for any extra steps. # # This script is run automatically at the end of the initial-copy # and sync-changes phone scripts. Hence, any code you add here # will be run after all to-phone content propagations. # # Example: if you are storing content in Termux's app-specific # storage for its speed, you may wish to copy select content to # shared storage (/sdcard) so it can be accessed from other apps. # # This can be used only to copy to shared storage; Termux cannot # access other apps' storage in Android 11 (and vice versa). ################################################################## mydir=$(dirname "$0") # this script's own folder source $mydir/config-phone.txt # get settings for scripts run on phone source $mydir/common.sh # get code common to both PC and phone printf '\nRunning postcopy hooks\n' #---------------------------------------------------------------- # Example: copy calendar ICS files to shared storage for use by # the Frigcal GUI run in the Pydroid 3 app. Apps do not normally # have access to other apps' app-specific storage. # # printf "\nCopying calendar content to shared storage\n" # rf -rf /sdcard/Downloads/Frigcal-source/Calendars # cp -rp $T/$STUFF/Code/frigcal/Calendars /sdcard/Downloads/Frigcal-source #---------------------------------------------------------------- #---------------------------------------------------------------- # Example: sync music up for use by folder player; or share with # a shuffling player, or open in CX file explorer's player,... # # printf "\nSyncing MP3s to shared storage\n" # if [ !e /sdcard/Music/Jazz ]; then mkdir /sdcard/Music/Jazz; fi # python3 $M/mergeall.py $T/$STUFF/Music/Jazz /sdcard/Music/Jazz -auto -skipcruft #---------------------------------------------------------------- #---------------------------------------------------------------- # But this doesn't work: Termux cannot access other apps' storage, # so this requires a manual copy in a file explorer (or Android 10). # # cp -rp $T/$STUFF/Websites/UNION /sdcard/Android/data/com.android.chrome #----------------------------------------------------------------