about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorCharadon <dev@iotib.net>2022-09-29 10:40:58 -0400
committerCharadon <dev@iotib.net>2022-09-29 10:40:58 -0400
commit1879cc19e1658d882aba2e4535b6f9097b86c46e (patch)
tree2f9791d43ab83dfc607e71246536ad55bfd95a0e
parent928adb2ea9697f321b1a4a226f4c7c3123f5e56b (diff)
downloaddscip-1879cc19e1658d882aba2e4535b6f9097b86c46e.tar.gz
setup.sh: Try to symlink the scripts before copying, to save space.
-rwxr-xr-xsetup.sh6
1 files changed, 4 insertions, 2 deletions
diff --git a/setup.sh b/setup.sh
index 3667909..7a788d4 100755
--- a/setup.sh
+++ b/setup.sh
@@ -62,10 +62,12 @@ install_dscip() {
 	mkdir -p "$PROJECT_LOCATION"
 	if [ -d "/usr/share/charadon/dscip" ]; # See if dscip is packaged/installed on system.
 	then
-		cp /usr/share/charadon/dscip/* "$PROJECT_LOCATION"
+		ln -s /usr/share/charadon/dscip/* "$PROJECT_LOCATION" || cp /usr/share/charadon/dscip/* "$PROJECT_LOCATION"
+		install -m755 /usr/share/charadon/dscip/config.sh "$PROJECT_LOCATION"
 	elif [ -d /usr/local/share/charadon/dscip ];
 	then
-		cp /usr/local/share/charaodn/dscip/* "$PROJECT_LOCATION"
+		ln -s /usr/local/share/charadon/dscip/* "$PROJECT_LOCATION" || cp /usr/local/share/charadon/dscip/* "$PROJECT_LOCATION"
+		install -m755 /usr/share/charadon/dscip/config.sh "$PROJECT_LOCATION"
 	else # If not, clone it from upstream.
 		git clone "https://opencode.net/charadon/dscip" "$PROJECT_LOCATION"
 	fi