Created
May 8, 2012 04:08
-
-
Save reyoung/2632502 to your computer and use it in GitHub Desktop.
This script convert all jpg,png,bmp files in current path to eps files.
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
#!/bin/bash | |
# @abstract This script convert all jpg,png,bmp files in current path to eps files. | |
# 这个脚本可以将本目录的所有jpg,png,bmp转换成eps文件。 | |
# @note The bmeps command must exist and in system PATH. | |
# 必须在系统中有bmeps命令,如果按照完整版CTex,就已经存在了。 | |
# @author reyoung <[email protected]> | |
ConvertExt() | |
{ | |
ext=$1 | |
flist=`ls *$ext` | |
echo "Converting *$ext To eps" | |
for fn in $flist | |
do | |
echo "Converting $fn" | |
bmeps -c $fn `basename $fn $ext`.eps | |
done | |
} | |
ConvertExt ".jpg" | |
ConvertExt ".png" | |
ConvertExt ".bmp" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment