forked from anthonyalfimov/SWONIC-Dynamic-Controls
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall-MAC.command
More file actions
executable file
·43 lines (35 loc) · 1.28 KB
/
install-MAC.command
File metadata and controls
executable file
·43 lines (35 loc) · 1.28 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
#!/usr/bin/env bash
# File: install-OSX.command
path=~/Documents/ROLI/LittleFoot/
cd -- "$(dirname "$0")" # switch to directory containing the script
mkdir -p "$path" # create directory if it doesn't exist
echo ""
echo ""
# Check if there are apps to install:
if [[ ! $(find . -maxdepth 1 -iname '*.littlefoot' -type f) ]]
then
echo "ERROR: no \`.littlefoot\` files found!"
echo ""
echo "Place \`install-OSX.command\` in the same folder as \`.littlefoot\` files you want to install and try again!"
echo ""
echo ""
echo "> You may close this window now <"
echo ""
echo ""
exit 1
fi
echo "Installation Progress"
echo ""
find . -maxdepth 1 -iname '*.littlefoot' -type f -print0 | while IFS= read -rd $'\0' file; do
# 2>/dev/null supresses console output
cp -f "$file" "$path" 2>/dev/null && echo "INSTALLED: [App] $(basename "$file")" || echo "FAILED: [App] $(basename "$file")"
done
find . -maxdepth 1 -iname '*.littlefootModes' -type d -print0 | while IFS= read -rd $'\0' file; do
# 2>/dev/null supresses console output
cp -fR "$file" "$path" 2>/dev/null && echo "INSTALLED: [Modes] $(basename "$file")" || echo "FAILED: [Modes] $(basename "$file")"
done
echo ""
echo ""
echo "> You may close this window now <"
echo ""
echo ""