forked from raspiblitz/raspiblitz
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Optimize Vagrant Mode raspiblitz#1579 (raspiblitz#1665)
- Loading branch information
Showing
14 changed files
with
63 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 12 additions & 20 deletions
32
alternative.platforms/amd64/packer/scripts/init_vagrant.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,18 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
echo "************* Vagrant Provisioning ********************" | ||
|
||
echo "************* Vagrant provisioning ********************" | ||
echo 'Syncing local code with RaspiBlitzVM' | ||
|
||
echo 'linking development files' | ||
source_dir=/vagrant/home.admin | ||
dest_dir=$HOME | ||
# make sure the lastest sync script is in place | ||
cp /vagrant/home.admin/XXsyncScripts.sh /home/admin/XXsyncScripts.sh | ||
|
||
cd $source_dir | ||
for f in *; do | ||
if [ "$f" = "assets" ] ; then | ||
continue | ||
fi | ||
# execute 'patch' command to sync laptop with VM | ||
/home/admin/XXsyncScripts.sh -run | ||
|
||
source_file="$source_dir/$f" | ||
dest_file="$dest_dir/$f" | ||
|
||
if [ -L $dest_file ] && [ "$(readlink "$dest_file")" = "$source_file" ]; then | ||
continue | ||
fi | ||
|
||
rm -rf "$dest_file" | ||
ln -s "$source_file" "$dest_file" | ||
done | ||
echo | ||
echo "************* NEXT ********************" | ||
echo "vagrant ssh --> ssh into your RaspiBlitzVM" | ||
echo "vagrant provision --> trigger code sync from outside VM" | ||
echo "patch --> trigger code sync from inside the VM" | ||
echo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.