about summary refs log tree commit diff
path: root/pkgs/tools/misc/pipelight/pipelight-fixup.patch
blob: 8033e8458d084d7045042e8568693a8d2b4f17c6 (plain) (blame)
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
54
diff -urN pipelight2.old/share/pipelight/install-dependency pipelight2.new/share/pipelight/install-dependency
--- pipelight2.old/share/pipelight/install-dependency	2014-07-27 01:38:39.806379602 +0200
+++ pipelight2.new/share/pipelight/install-dependency	2014-07-27 01:40:08.689861556 +0200
@@ -734,42 +734,14 @@
	return 0
 }

-# Use fetch on FreeBSD if wget is not available
-if command -v wget >/dev/null 2>&1; then
-	download_file()
-	{
-		wget -O "$1" "$2"
-	}
-	get_download_size()
-	{
-		local filesize="$(wget -O- "$1" --spider --server-response 2>&1 | sed -ne '/Content-Length/{s/.*: //;p}')"
-		local re='^[0-9]+$'
-		if [[ "$filesize" -ne "0" ]] && [[ "$filesize" =~ $re ]]; then
-			echo "$(($filesize/(1024*1024)))"
-		else
-			echo "N/A"
-		fi
-	}
-elif command -v fetch >/dev/null 2>&1; then
-	download_file()
-	{
-		fetch -o "$1" "$2"
-	}
-	get_download_size()
-	{
-		echo "N/A"
-	}
-else
-	download_file()
-	{
-		echo "ERROR: Could neither find wget nor fetch. Unable to download file!" >&2
-		return 1
-	}
-	get_download_size()
-	{
-		echo "N/A"
-	}
-fi
+download_file()
+{
+	curl --cacert /etc/ssl/certs/ca-bundle.crt -o "$1" "$2"
+}
+get_download_size()
+{
+	echo "N/A"
+}

 # Use shasum instead of sha256sum on MacOS / *BSD
 if ! command -v sha256sum >/dev/null 2>&1 && command -v shasum >/dev/null 2>&1; then