Added target for uploading gadict dictd dictionary to Android GoldenDict.
authorOleksandr Gavenko <gavenkoa@gmail.com>
Fri, 19 Nov 2021 00:15:34 +0200
changeset 1327 d2c3b60decaf
parent 1326 e691a9d173a0
child 1328 c3c01d148196
Added target for uploading gadict dictd dictionary to Android GoldenDict.
Makefile
--- a/Makefile	Wed Nov 17 00:47:50 2021 +0200
+++ b/Makefile	Fri Nov 19 00:15:34 2021 +0200
@@ -222,13 +222,23 @@
 	done
 	rm -f $(patsubst %,$(elispdir)/%,$(notdir $(EL_FILES))) $(patsubst %.el,$(elispdir)/%.elc,$(notdir $(EL_FILES)))
 
-.PHONY: upload-anki-android
-upload-anki-android: $(SRS_ANKI_FILES)
+.PHONY: android-upload-anki
+android-upload-anki: $(SRS_ANKI_FILES)
 	\
 for f in $(SRS_ANKI_FILES); do \
   $(ADB) push $$f /sdcard/AnkiDroid/; \
 done
 
+goldendict_dir := /sdcard/GoldenDict/
+
+.PHONY: android-upload-goldendict
+android-upload-goldendict: dist/dictd/gadict.dict.dz dist/dictd/gadict.index
+	\
+$(ADB) shell mkdir $(goldendict_dir); \
+for f in dist/dictd/gadict.dict.dz dist/dictd/gadict.index; do \
+  $(ADB) push $$f $(goldendict_dir); \
+done
+
 ################################################################
 # Deploy/release targets.