-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpush-deb
More file actions
executable file
·54 lines (42 loc) · 1.74 KB
/
push-deb
File metadata and controls
executable file
·54 lines (42 loc) · 1.74 KB
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/usr/bin/env bash
if [ "$#" != 1 ]; then
echo "Usage: ./push-deb DEB_FOLDER"
exit 3
fi
package_cloud version >/dev/null 2>&1 || { echo "I require package_cloud but it's not installed. To install run 'sudo gem install package_cloud'."; exit 3; }
REPOSITORY="JonasGroeger/soundnode"
DEB_FOLDER="$1"
if [ ! -d "$DEB_FOLDER" ]; then
echo "$DEB_FOLDER is not folder. Please provide a valid folder!"
exit 6
fi
find "$DEB_FOLDER" -maxdepth 1 -mindepth 1 -name "soundnode_*.deb" -type f | while read DEB_FILE; do
if file "$DEB_FILE" | grep -qv "Debian binary package"; then
echo "$DEB_FILE is not a valid debian package!"
exit 7
fi
##########
# Ubuntu #
##########
package_cloud push "$REPOSITORY/ubuntu/trusty" "$DEB_FILE" # 14.04 LTS
package_cloud push "$REPOSITORY/ubuntu/xenial" "$DEB_FILE" # 16.04 LTS
package_cloud push "$REPOSITORY/ubuntu/yakkety" "$DEB_FILE" # 16.10
##########
# Debian #
##########
package_cloud push "$REPOSITORY/debian/jessie" "$DEB_FILE" # 8
################
# ElementaryOS #
################
package_cloud push "$REPOSITORY/elementaryos/jupiter" "$DEB_FILE" # 0.1
package_cloud push "$REPOSITORY/elementaryos/luna" "$DEB_FILE" # 0.2
package_cloud push "$REPOSITORY/elementaryos/freya" "$DEB_FILE" # 0.3
##############
# Linux Mint #
##############
package_cloud push "$REPOSITORY/linuxmint/qiana" "$DEB_FILE" # 17
package_cloud push "$REPOSITORY/linuxmint/rebecca" "$DEB_FILE" # 17.1
package_cloud push "$REPOSITORY/linuxmint/rafaela" "$DEB_FILE" # 17.2
package_cloud push "$REPOSITORY/linuxmint/rosa" "$DEB_FILE" # 17.3
package_cloud push "$REPOSITORY/linuxmint/sarah" "$DEB_FILE" # 18
done