-
Notifications
You must be signed in to change notification settings - Fork 7
/
publish-jars
executable file
·29 lines (21 loc) · 751 Bytes
/
publish-jars
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/usr/bin/env bash
set -eu
DT=$(date +"%Y.%m.%d.%H.%M")
JARS_STORE=/web/research/melt.cs.umn.edu/downloads/silver-dev/jars
JARS_BACKUP=/project/melt4/People/ted/jars_bak
if [ ! -d $JARS_STORE ]; then
echo "Must be running on a umn machine in the melt group."
exit 1
fi
if [ ! -d jars ]; then
echo "Should be run from root of silver tree."
exit 2
fi
# I like to keep a backup series of our jars...
cp $JARS_STORE/silver.compiler.composed.Default.jar $JARS_BACKUP/silver.compiler.composed.Default.jar.${DT}
# Do the copy with rsync, so we only copy if the file changed...
# -c Use checksums and avoid copying if it's the same.
rsync -ic jars/*.jar $JARS_STORE
# fix permissions
chgrp melt $JARS_STORE/*.jar
chmod 775 $JARS_STORE/*.jar