Fix the installer script to run on macos

This commit is contained in:
Sameer Rahmani 2022-12-29 12:10:26 +00:00
parent ba177678cc
commit 99b7fb9728
2 changed files with 37 additions and 26 deletions

View File

@ -141,7 +141,9 @@ data. The typical example of this would be Lisp or Scheme source code."
:flag paredit
:flag-default t)
(fpkg/use paredit
:hook (prog-mode . paredit-mode)))
:hook ((emacs-lisp-mode . paredit-mode)
(clojure-mode . paredit-mode)
(scheme-mode . paredit-mode))))
(defcube fg42/cursor-cube

View File

@ -48,48 +48,57 @@ install_fonts() {
wget "https://dl.fg42.org/fonts/0.1.0.tar.gz" -O ~/.fonts/fg42.tar.gz
tar zxf ~/.fonts/fg42.tar.gz -C ~/.fonts --strip 1
cp -r $fg42_home/share/fonts/vazir/* ~/.fonts/
cp -r "$fg42_home/share/fonts/vazir/*" ~/.fonts/
info "Font installation is done."
}
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
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"
chmod +x $fg42_home/fg42
chmod +x $fg42_home/fg42-wm
chmod +x "$fg42_home/fg42"
chmod +x" $fg42_home/fg42-wm"
info "Copying conifg file to ~/.fg42.el..."
cp $fg42_home/config/fg42.user.el ~/.fg42.el
cp "$fg42_home/config/fg42.user.el" ~/.fg42.el
info "Installing the runners..."
sudo mkdir -p /usr/local/bin/
sudo rm -f /usr/local/bin/fg42
sudo rm -f /usr/local/bin/fg42-wm
sudo ln -s $fg42_home/fg42 /usr/local/bin/fg42
sudo ln -s $fg42_home/fg42-wm /usr/local/bin/fg42-wm
sudo ln -s "$fg42_home/fg42" /usr/local/bin/fg42
sudo ln -s "$fg42_home/fg42-wm" /usr/local/bin/fg42-wm
info "Copying share files..."
sudo mkdir -p /usr/share/fg42/
sudo mkdir -p /usr/local/share/applications
sudo cp $fg42_home/share/applications/fg42.desktop /usr/local/share/applications
sudo cp -r $fg42_home/share/icons/hicolor/ /usr/local/share/icons
sudo cp -r $fg42_home/share/* /usr/share/fg42/
sudo mkdir -p /usr/share/xsessions/
sudo cp -r $fg42_home/share/xsessions/fg42.desktop /usr/share/xsessions/
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
info "Copying share files..."
sudo mkdir -p /usr/share/fg42/
sudo mkdir -p /usr/local/share/applications
sudo cp "$fg42_home/share/applications/fg42.desktop" /usr/local/share/applications
sudo cp -r "$fg42_home/share/icons/hicolor/" /usr/local/share/icons
sudo cp -r "$fg42_home/share/*" /usr/share/fg42/
sudo mkdir -p /usr/share/xsessions/
sudo cp -r "$fg42_home/share/xsessions/fg42.desktop" /usr/share/xsessions/
else
info "Skipping share files since this is not a Linux env..."
fi
}
install_extras() {
info "Copying share files..."
sudo mkdir -p /usr/share/fg42/
sudo cp $fg42_home/share/applications/fg42.desktop /usr/local/share/applications
sudo cp -r $fg42_home/share/icons/hicolor/ /usr/local/share/icons
sudo cp -r $fg42_home/share/* /usr/share/fg42/
sudo cp -r $fg42_home/share/xsessions/fg42.desktop /usr/share/xsessions/
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
info "Copying share files..."
sudo mkdir -p /usr/share/fg42/
sudo cp "$fg42_home/share/applications/fg42.desktop" /usr/local/share/applications
sudo cp -r "$fg42_home/share/icons/hicolor/" /usr/local/share/icons
sudo cp -r "$fg42_home/share/*" /usr/share/fg42/
sudo cp -r "$fg42_home/share/xsessions/fg42.desktop" /usr/share/xsessions/
else
info "Skipping share files since this is not a Linux env..."
fi
}
install_$1
eval "install_$1"