Separate the sed usage in installer script based on the os type

This commit is contained in:
Sameer Rahmani 2022-12-30 11:59:54 +00:00
parent 99b7fb9728
commit 26546f827d
1 changed files with 10 additions and 2 deletions

View File

@ -56,8 +56,16 @@ install_runners() {
info "Creating the runner scripts..."
cp "$current/templates/fg42" "$current/../fg42"
cp "$current/templates/fg42-wm" "$current/../fg42-wm"
sed -i'' "s'___FG42_HOME___'$fg42_home'" "$fg42_home/fg42"
sed -i'' "s'___FG42_HOME___'$fg42_home'" "$fg42_home/fg42-wm"
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
sed -i "s'___FG42_HOME___'$fg42_home'" "$fg42_home/fg42"
sed -i "s'___FG42_HOME___'$fg42_home'" "$fg42_home/fg42-wm"
fi
if [[ "$OSTYPE" == "darwin"* ]]; then
sed -i'' -e "s'___FG42_HOME___'$fg42_home'" "$fg42_home/fg42"
sed -i'' -e "s'___FG42_HOME___'$fg42_home'" "$fg42_home/fg42-wm"
fi
chmod +x "$fg42_home/fg42"
chmod +x" $fg42_home/fg42-wm"