Skip to content

Commit 6cb07e8

Browse files
authored
chore: symlink the installed binaries to ~/.local/bin (#825)
1 parent 8dff93a commit 6cb07e8

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

scripts/install/install.sh

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,20 @@ if [[ $quoted_install_dir = \"$HOME/* ]]; then
217217
quoted_install_dir=${quoted_install_dir/$HOME\//\$HOME/}
218218
fi
219219

220+
if [[ -d $HOME/.local/bin ]]; then
221+
# First, remove the symlinks if they exist
222+
rm -f $HOME/.local/bin/apify
223+
rm -f $HOME/.local/bin/actor
224+
rm -f $HOME/.local/bin/apify-cli
225+
226+
# Symlink the three executables to /usr/local/bin
227+
ln -s "$bin_dir/apify" $HOME/.local/bin/apify
228+
ln -s "$bin_dir/actor" $HOME/.local/bin/actor
229+
ln -s "$bin_dir/apify-cli" $HOME/.local/bin/apify-cli
230+
231+
info "Symlinked apify, actor, and apify-cli to $HOME/.local/bin"
232+
fi
233+
220234
echo
221235

222236
case $(basename "$SHELL") in
@@ -344,6 +358,3 @@ fi
344358

345359
info_bold " apify --help"
346360
echo
347-
348-
# Not ideal but its the only way to refresh the shell (this also means if you type exit / CTRL+D, you'll need to do it twice)
349-
sh -c $SHELL

0 commit comments

Comments
 (0)