Created
February 27, 2012 19:20
-
-
Save rpavlik/1926441 to your computer and use it in GitHub Desktop.
Makefile to convert Mendeley on Linux PDF file references to equivalent ones (over dropbox) on Windows - for Qiqqa import.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/make | |
TARGET_DIR:=forwin | |
# All bib files with no spaces in their name. | |
FILES:=$(shell ls *.bib | grep "^[^ ]*$$") | |
CONVERTED_FILES:=$(patsubst %,$(TARGET_DIR)/%,$(FILES)) | |
all: $(CONVERTED_FILES) | |
$(TARGET_DIR): | |
@echo Creating destination directory $(TARGET_DIR) | |
mkdir -p $(TARGET_DIR) | |
$(CONVERTED_FILES): $(TARGET_DIR)/% : % $(TARGET_DIR) $(MAKEFILE) | |
@echo Converting $< for Windows use | |
@sed --regexp-extended -e 's_home/rpavlik_C$$\\backslash$$:/Users/rpavlik_' $< > $@ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment