您可以在一个特定的Vagrantfile运行vagrant box outdated
检查,如果这个特殊的是过时的或没有。
您还可以运行vagrant box outdated --global
检查所有已安装的箱子,例如
[email protected]:~$ vagrant box outdated --global
* 'windows_ie' wasn't added from a catalog, no version information
* 'ubuntu/trusty64' is outdated! Current: 20151117.0.0. Latest: 20151201.0.0
* 'ubuntu-12.04' wasn't added from a catalog, no version information
* 'puphpet/centos65-x64' is outdated! Current: 2.0. Latest: 20151130
* 'hashicorp/boot2docker' (v1.7.8) is up to date
* 'centos65' wasn't added from a catalog, no version information
* 'boxcutter/ubuntu1504' is outdated! Current: 2.0.9. Latest: 2.0.10
* 'aribabox' wasn't added from a catalog, no version information
您可以从流浪源检查,但基本上,如果框有元数据信息,它将从地图集检查(盒回购),并从最新的盒子中获取元数据并比较2个元数据。
我知道这是可能的,但是有可能将它翻译成bash中的任何一种if语句,例如? –
你应该可以运行命令并读取结果 –