Skip to content

Commit

Permalink
feat: add make build script
Browse files Browse the repository at this point in the history
  • Loading branch information
Bambooin committed Jun 18, 2021
1 parent f6e0448 commit ea79e06
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 0 deletions.
18 changes: 18 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# build script for rimerc
releasePath=release

.PHONY: all pacakge archive install clean

all: archive

pacakge:
./script/package.sh

archive: pacakge
./script/archive.sh

clean:
rm -rf ${releasePath}

install: pacakge
# install
15 changes: 15 additions & 0 deletions script/archive.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/usr/bin/env bash

releasePath=release

flavors=(fcitx fcitx5 ibus squirrel trime weasel)
version=$(git describe --abbrev=0)

pushd ${releasePath}

for flavor in ${flavors[*]}
do
zip -r rimerc-${flavor}-${version}.zip ${flavor} -x "*/.*"
done

popd
17 changes: 17 additions & 0 deletions script/package.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/usr/bin/env bash

releasePath=release

flavors=(fcitx fcitx5 ibus squirrel trime weasel)
schemas=(common easy_en luna_pinyin)

mkdir -p ${releasePath}

for flavor in ${flavors[*]}
do
cp -arH ${flavor} ${releasePath}
for schema in ${schemas[*]}
do
cp -ar ${schema}/* ${releasePath}/${flavor}
done
done

0 comments on commit ea79e06

Please sign in to comment.