mirror of
https://github.com/chromebrew/chromebrew.git
synced 2026-01-08 23:18:10 -05:00
Change deprecated File.exists?/Dir.exists? to File.exist?/Dir.exist? (#6893)
* Change `File.exists?` to `File.exist?` * Change `Dir.exists?` to `Dir.exist?`
This commit is contained in:
@@ -8,7 +8,7 @@ class Acli < Package
|
||||
compatibility 'all'
|
||||
source_url 'SKIP'
|
||||
|
||||
depends_on 'php74' unless File.exists? "#{CREW_PREFIX}/bin/php"
|
||||
depends_on 'php74' unless File.exist? "#{CREW_PREFIX}/bin/php"
|
||||
|
||||
def self.preflight
|
||||
major = `php -v 2> /dev/null | head -1 | cut -d' ' -f2 | cut -d'.' -f1`
|
||||
|
||||
@@ -40,7 +40,7 @@ class Android_studio < Package
|
||||
response = STDIN.getc
|
||||
config_dirs = ["#{HOME}/.android", "#{HOME}/Android"]
|
||||
config_dirs.each { |config_dir|
|
||||
if Dir.exists? config_dir
|
||||
if Dir.exist? config_dir
|
||||
case response
|
||||
when "y", "Y"
|
||||
FileUtils.rm_rf config_dir
|
||||
|
||||
@@ -8,7 +8,7 @@ class Box < Package
|
||||
compatibility 'all'
|
||||
source_url 'SKIP'
|
||||
|
||||
depends_on 'php74' unless File.exists? "#{CREW_PREFIX}/bin/php"
|
||||
depends_on 'php74' unless File.exist? "#{CREW_PREFIX}/bin/php"
|
||||
|
||||
def self.install
|
||||
downloader 'https://github.com/box-project/box/releases/download/3.16.0/box.phar'
|
||||
|
||||
@@ -22,7 +22,7 @@ class Byobu < Package
|
||||
x86_64: 'f0a2933be3634409f9405e33979b06068f734d4a7b100dac01776a288fa3c843',
|
||||
})
|
||||
|
||||
depends_on 'tmux' unless File.exists? "#{CREW_PREFIX}/bin/screen"
|
||||
depends_on 'tmux' unless File.exist? "#{CREW_PREFIX}/bin/screen"
|
||||
|
||||
def self.build
|
||||
system './configure'
|
||||
|
||||
@@ -11,5 +11,5 @@ class Camp < Package
|
||||
|
||||
depends_on 'httpd'
|
||||
depends_on 'percona_server'
|
||||
depends_on 'php74' unless File.exists? "#{CREW_PREFIX}/bin/php"
|
||||
depends_on 'php74' unless File.exist? "#{CREW_PREFIX}/bin/php"
|
||||
end
|
||||
|
||||
@@ -8,11 +8,11 @@ class Composer < Package
|
||||
compatibility 'all'
|
||||
source_url 'SKIP'
|
||||
|
||||
depends_on 'php74' unless File.exists? "#{CREW_PREFIX}/bin/php"
|
||||
depends_on 'php74' unless File.exist? "#{CREW_PREFIX}/bin/php"
|
||||
depends_on 'xdg_base'
|
||||
|
||||
def self.preinstall
|
||||
if Dir.exists?("#{HOME}/.config") && !File.symlink?("#{HOME}/.config")
|
||||
if Dir.exist?("#{HOME}/.config") && !File.symlink?("#{HOME}/.config")
|
||||
# Save any existing configuration
|
||||
FileUtils.cp_r "#{HOME}/.config", "#{CREW_PREFIX}", remove_destination: true unless Dir.empty? "#{HOME}/.config"
|
||||
else
|
||||
|
||||
@@ -40,7 +40,7 @@ class Dbeaver < Package
|
||||
|
||||
def self.remove
|
||||
config_dir = "#{HOME}/.local/share/DBeaverData"
|
||||
if Dir.exists? config_dir
|
||||
if Dir.exist? config_dir
|
||||
print "Would you like to remove the #{config_dir} directory? [y/N] "
|
||||
case STDIN.getc
|
||||
when "y", "Y"
|
||||
|
||||
@@ -22,7 +22,7 @@ class Deployer < Package
|
||||
x86_64: '57f072d4617d8dae9ab0d071aa5a29c66fb8453d08e9559a658d7c450a82f2dd',
|
||||
})
|
||||
|
||||
depends_on 'php74' unless File.exists? "#{CREW_PREFIX}/bin/php"
|
||||
depends_on 'php74' unless File.exist? "#{CREW_PREFIX}/bin/php"
|
||||
depends_on 'composer' => :build
|
||||
|
||||
def self.install
|
||||
|
||||
@@ -45,7 +45,7 @@ class Dosbox < Package
|
||||
print "Would you like to remove the config directory? [y/N] "
|
||||
response = STDIN.getc
|
||||
config_dir = "#{HOME}/.dosbox"
|
||||
if Dir.exists? config_dir
|
||||
if Dir.exist? config_dir
|
||||
case response
|
||||
when "y", "Y"
|
||||
FileUtils.rm_rf config_dir
|
||||
|
||||
@@ -24,7 +24,7 @@ class Dropbox < Package
|
||||
x86_64: 'c2c699372e4646ce5ed542fa189c08dc44dea1ae312f7401f1f385279e1b2ded',
|
||||
})
|
||||
|
||||
depends_on 'python2' unless File.exists? "#{CREW_PREFIX}/bin/python"
|
||||
depends_on 'python2' unless File.exist? "#{CREW_PREFIX}/bin/python"
|
||||
depends_on 'libxslt'
|
||||
|
||||
def self.build
|
||||
|
||||
@@ -39,7 +39,7 @@ class Electric < Package
|
||||
|
||||
def self.remove
|
||||
log_file = "#{HOME}/electric.log"
|
||||
if File.exists? log_file
|
||||
if File.exist? log_file
|
||||
print "Would you like to remove #{log_file}? [y/N] "
|
||||
case STDIN.getc
|
||||
when "y", "Y"
|
||||
|
||||
@@ -32,7 +32,7 @@ class Exodus < Package
|
||||
|
||||
def self.remove
|
||||
config_dir = "#{CREW_PREFIX}/.config/Exodus"
|
||||
if Dir.exists? config_dir
|
||||
if Dir.exist? config_dir
|
||||
puts "WARNING: This will remove all Exodus data!".orange
|
||||
print "Would you like to remove the #{config_dir} directory? [y/N] "
|
||||
case STDIN.getc
|
||||
|
||||
@@ -42,7 +42,7 @@ class Ferdi < Package
|
||||
|
||||
def self.remove
|
||||
config_dir = "#{HOME}/.config/autostart"
|
||||
if Dir.exists? config_dir
|
||||
if Dir.exist? config_dir
|
||||
print "Would you like to remove the config directory #{config_dir}? [y/N] "
|
||||
case STDIN.getc
|
||||
when "y", "Y"
|
||||
|
||||
@@ -36,7 +36,7 @@ class Flutter < Package
|
||||
response = STDIN.getc
|
||||
config_dirs = ["#{HOME}/.flutter", "#{CREW_PREFIX}/share/flutter"]
|
||||
config_dirs.each { |config_dir|
|
||||
if Dir.exists? config_dir
|
||||
if Dir.exist? config_dir
|
||||
case response
|
||||
when "y", "Y"
|
||||
FileUtils.rm_rf config_dir
|
||||
|
||||
@@ -26,7 +26,7 @@ class Foxit_reader < Package
|
||||
foxit_sha256 = '6b579bd4ecdf86f7e70a009886c511da0b5085b831b0d6afc42442cabc249b90'
|
||||
platform = 'Linux-64-bit'
|
||||
end
|
||||
unless File.exists? foxit_bin
|
||||
unless File.exist? foxit_bin
|
||||
puts "\nCopy and paste into your browser address bar the url below and download to #{HOME}/Downloads.".orange
|
||||
puts "\nhttps://www.foxit.com/downloads/latest.html?product=Foxit-Reader&platform=#{platform}&version=&package_type=&language=English&distID=".orange
|
||||
puts "\nAfter the download is complete, restart and install to #{CREW_DEST_PREFIX}/share/foxitreader.\n".orange
|
||||
|
||||
@@ -61,7 +61,7 @@ class Gcloud < Package
|
||||
response = STDIN.getc
|
||||
config_dirs = ["#{HOME}/.config/gcloud", "#{CREW_PREFIX}/share/gcloud"]
|
||||
config_dirs.each { |config_dir|
|
||||
if Dir.exists? config_dir
|
||||
if Dir.exist? config_dir
|
||||
case response
|
||||
when "y", "Y"
|
||||
FileUtils.rm_rf config_dir
|
||||
|
||||
@@ -59,7 +59,7 @@ class Gtk2 < Package
|
||||
end
|
||||
|
||||
def self.postinstall
|
||||
unless File.exists? "#{CREW_PREFIX}/bin/gtk-update-icon-cache"
|
||||
unless File.exist? "#{CREW_PREFIX}/bin/gtk-update-icon-cache"
|
||||
Dir.chdir "#{CREW_PREFIX}/bin" do
|
||||
FileUtils.ln_s 'gtk2-update-icon-cache', 'gtk-update-icon-cache'
|
||||
end
|
||||
|
||||
@@ -16,16 +16,16 @@ class Jdk11 < Package
|
||||
})
|
||||
|
||||
def self.preflight
|
||||
abort "JDK8 installed.".lightgreen if Dir.exists? "#{CREW_PREFIX}/share/jdk8"
|
||||
abort "JDK15 installed.".lightgreen if Dir.exists? "#{CREW_PREFIX}/share/jdk15"
|
||||
abort "JDK16 installed.".lightgreen if Dir.exists? "#{CREW_PREFIX}/share/jdk16"
|
||||
abort "JDK17 installed.".lightgreen if Dir.exists? "#{CREW_PREFIX}/share/jdk17"
|
||||
abort "JDK8 installed.".lightgreen if Dir.exist? "#{CREW_PREFIX}/share/jdk8"
|
||||
abort "JDK15 installed.".lightgreen if Dir.exist? "#{CREW_PREFIX}/share/jdk15"
|
||||
abort "JDK16 installed.".lightgreen if Dir.exist? "#{CREW_PREFIX}/share/jdk16"
|
||||
abort "JDK17 installed.".lightgreen if Dir.exist? "#{CREW_PREFIX}/share/jdk17"
|
||||
end
|
||||
|
||||
def self.install
|
||||
jdk_bin = "#{HOME}/Downloads/jdk-#{version}_linux-x64_bin.tar.gz"
|
||||
jdk_sha256 = '9732bdd946b393ec527e4d5ff1f7e4667dc5150685bc3c9c7b1d042c657929db'
|
||||
unless File.exists? jdk_bin then
|
||||
unless File.exist? jdk_bin then
|
||||
puts
|
||||
puts "Oracle now requires an account to download the JDK.".orange
|
||||
puts
|
||||
|
||||
@@ -16,16 +16,16 @@ class Jdk15 < Package
|
||||
})
|
||||
|
||||
def self.preflight
|
||||
abort "JDK8 installed.".lightgreen if Dir.exists? "#{CREW_PREFIX}/share/jdk8"
|
||||
abort "JDK11 installed.".lightgreen if Dir.exists? "#{CREW_PREFIX}/share/jdk11"
|
||||
abort "JDK16 installed.".lightgreen if Dir.exists? "#{CREW_PREFIX}/share/jdk16"
|
||||
abort "JDK17 installed.".lightgreen if Dir.exists? "#{CREW_PREFIX}/share/jdk17"
|
||||
abort "JDK8 installed.".lightgreen if Dir.exist? "#{CREW_PREFIX}/share/jdk8"
|
||||
abort "JDK11 installed.".lightgreen if Dir.exist? "#{CREW_PREFIX}/share/jdk11"
|
||||
abort "JDK16 installed.".lightgreen if Dir.exist? "#{CREW_PREFIX}/share/jdk16"
|
||||
abort "JDK17 installed.".lightgreen if Dir.exist? "#{CREW_PREFIX}/share/jdk17"
|
||||
end
|
||||
|
||||
def self.install
|
||||
jdk_bin = "#{HOME}/Downloads/jdk-#{version}_linux-x64_bin.tar.gz"
|
||||
jdk_sha256 = '54b29a3756671fcb4b6116931e03e86645632ec39361bc16ad1aaa67332c7c61'
|
||||
unless File.exists? jdk_bin then
|
||||
unless File.exist? jdk_bin then
|
||||
puts
|
||||
puts "Oracle now requires an account to download the JDK.".orange
|
||||
puts
|
||||
|
||||
@@ -16,16 +16,16 @@ class Jdk16 < Package
|
||||
})
|
||||
|
||||
def self.preflight
|
||||
abort "JDK8 installed.".lightgreen if Dir.exists? "#{CREW_PREFIX}/share/jdk8"
|
||||
abort "JDK11 installed.".lightgreen if Dir.exists? "#{CREW_PREFIX}/share/jdk11"
|
||||
abort "JDK15 installed.".lightgreen if Dir.exists? "#{CREW_PREFIX}/share/jdk15"
|
||||
abort "JDK17 installed.".lightgreen if Dir.exists? "#{CREW_PREFIX}/share/jdk17"
|
||||
abort "JDK8 installed.".lightgreen if Dir.exist? "#{CREW_PREFIX}/share/jdk8"
|
||||
abort "JDK11 installed.".lightgreen if Dir.exist? "#{CREW_PREFIX}/share/jdk11"
|
||||
abort "JDK15 installed.".lightgreen if Dir.exist? "#{CREW_PREFIX}/share/jdk15"
|
||||
abort "JDK17 installed.".lightgreen if Dir.exist? "#{CREW_PREFIX}/share/jdk17"
|
||||
end
|
||||
|
||||
def self.install
|
||||
jdk_bin = "#{HOME}/Downloads/jdk-#{version}_linux-x64_bin.tar.gz"
|
||||
jdk_sha256 = '630e3e56c58f45db3788343ce842756d5a5a401a63884242cc6a141071285a62'
|
||||
unless File.exists? jdk_bin then
|
||||
unless File.exist? jdk_bin then
|
||||
puts
|
||||
puts "Oracle now requires an account to download the JDK.".orange
|
||||
puts
|
||||
|
||||
@@ -16,16 +16,16 @@ class Jdk17 < Package
|
||||
})
|
||||
|
||||
def self.preflight
|
||||
abort "JDK8 installed.".lightgreen if Dir.exists? "#{CREW_PREFIX}/share/jdk8"
|
||||
abort "JDK11 installed.".lightgreen if Dir.exists? "#{CREW_PREFIX}/share/jdk11"
|
||||
abort "JDK15 installed.".lightgreen if Dir.exists? "#{CREW_PREFIX}/share/jdk15"
|
||||
abort "JDK16 installed.".lightgreen if Dir.exists? "#{CREW_PREFIX}/share/jdk16"
|
||||
abort "JDK8 installed.".lightgreen if Dir.exist? "#{CREW_PREFIX}/share/jdk8"
|
||||
abort "JDK11 installed.".lightgreen if Dir.exist? "#{CREW_PREFIX}/share/jdk11"
|
||||
abort "JDK15 installed.".lightgreen if Dir.exist? "#{CREW_PREFIX}/share/jdk15"
|
||||
abort "JDK16 installed.".lightgreen if Dir.exist? "#{CREW_PREFIX}/share/jdk16"
|
||||
end
|
||||
|
||||
def self.install
|
||||
jdk_bin = "#{HOME}/Downloads/jdk-17_linux-x64_bin.tar.gz"
|
||||
jdk_sha256 = '342e76bb9ded80aa1edd566efbae42f8f1c2366e19b9189e5941b45893b9861f'
|
||||
unless File.exists? jdk_bin then
|
||||
unless File.exist? jdk_bin then
|
||||
puts
|
||||
puts "Oracle now requires an account to download the JDK.".orange
|
||||
puts
|
||||
|
||||
@@ -22,10 +22,10 @@ class Jdk8 < Package
|
||||
})
|
||||
|
||||
def self.preflight
|
||||
abort "JDK11 installed.".lightgreen if Dir.exists? "#{CREW_PREFIX}/share/jdk11"
|
||||
abort "JDK15 installed.".lightgreen if Dir.exists? "#{CREW_PREFIX}/share/jdk15"
|
||||
abort "JDK16 installed.".lightgreen if Dir.exists? "#{CREW_PREFIX}/share/jdk16"
|
||||
abort "JDK17 installed.".lightgreen if Dir.exists? "#{CREW_PREFIX}/share/jdk17"
|
||||
abort "JDK11 installed.".lightgreen if Dir.exist? "#{CREW_PREFIX}/share/jdk11"
|
||||
abort "JDK15 installed.".lightgreen if Dir.exist? "#{CREW_PREFIX}/share/jdk15"
|
||||
abort "JDK16 installed.".lightgreen if Dir.exist? "#{CREW_PREFIX}/share/jdk16"
|
||||
abort "JDK17 installed.".lightgreen if Dir.exist? "#{CREW_PREFIX}/share/jdk17"
|
||||
end
|
||||
|
||||
def self.install
|
||||
@@ -40,7 +40,7 @@ class Jdk8 < Package
|
||||
jdk_bin = "#{HOME}/Downloads/jdk-#{version}-linux-x64.tar.gz"
|
||||
jdk_sha256 = '7262e6c7cf8cc8f2a9a5982edc26fa3025aa60101902424619c3bb0cff9bd89f'
|
||||
end
|
||||
unless File.exists? jdk_bin
|
||||
unless File.exist? jdk_bin
|
||||
puts
|
||||
puts "Oracle now requires an account to download the JDK.".orange
|
||||
puts
|
||||
|
||||
@@ -27,7 +27,7 @@ class Komodo < Package
|
||||
response = STDIN.getc
|
||||
config_dirs = ["#{HOME}/.komodoide", "#{HOME}/.activestate"]
|
||||
config_dirs.each { |config_dir|
|
||||
if Dir.exists? config_dir
|
||||
if Dir.exist? config_dir
|
||||
case response
|
||||
when "y", "Y"
|
||||
FileUtils.rm_rf config_dir
|
||||
|
||||
@@ -22,7 +22,7 @@ class Leiningen < Package
|
||||
|
||||
def self.remove
|
||||
config_dir = "#{HOME}/.lein"
|
||||
if Dir.exists? config_dir
|
||||
if Dir.exist? config_dir
|
||||
print "Would you like to remove the #{config_dir} directory? [y/N] "
|
||||
case STDIN.getc
|
||||
when "y", "Y"
|
||||
|
||||
@@ -33,7 +33,7 @@ class Mysql < Package
|
||||
end
|
||||
|
||||
def self.postinstall
|
||||
unless Dir.exists? "#{CREW_PREFIX}/mysql/data"
|
||||
unless Dir.exist? "#{CREW_PREFIX}/mysql/data"
|
||||
system "mysqld --initialize-insecure --user=#{USER}"
|
||||
end
|
||||
puts
|
||||
|
||||
@@ -40,7 +40,7 @@ class Natron < Package
|
||||
|
||||
def self.remove
|
||||
config_dir = "#{HOME}/.Natron"
|
||||
if Dir.exists? config_dir
|
||||
if Dir.exist? config_dir
|
||||
print "Would you like to remove the config directory #{config_dir}? [y/N] "
|
||||
case STDIN.getc
|
||||
when "y", "Y"
|
||||
|
||||
@@ -26,7 +26,7 @@ class Netbeans < Package
|
||||
|
||||
def self.remove
|
||||
config_dir = "#{HOME}/.netbeans"
|
||||
if Dir.exists? config_dir
|
||||
if Dir.exist? config_dir
|
||||
print "Would you like to remove the config directory #{config_dir}? [y/N] "
|
||||
case STDIN.getc
|
||||
when 'y', 'Y'
|
||||
|
||||
@@ -50,7 +50,7 @@ class Newsboat < Package
|
||||
|
||||
def self.remove
|
||||
config_dir = "#{HOME}/.newsboat"
|
||||
if Dir.exists? config_dir
|
||||
if Dir.exist? config_dir
|
||||
print "Would you like to remove the config directory #{config_dir}? [y/N] "
|
||||
case STDIN.getc
|
||||
when 'y', 'Y'
|
||||
|
||||
@@ -82,7 +82,7 @@ class Nginx < Package
|
||||
end
|
||||
|
||||
def self.remove
|
||||
if Dir.exists? "#{CREW_PREFIX}/share/nginx"
|
||||
if Dir.exist? "#{CREW_PREFIX}/share/nginx"
|
||||
puts
|
||||
print "Would you like to remove #{CREW_PREFIX}/share/nginx? [y/N] "
|
||||
response = STDIN.getc
|
||||
|
||||
@@ -22,7 +22,7 @@ class Percona_boost < Package
|
||||
x86_64: '4cfcf14440dae594c3ad0c8fa3086f08c0e90787785d82e1b54454bcf0941ed9',
|
||||
})
|
||||
|
||||
depends_on 'python2' unless File.exists? "#{CREW_PREFIX}/bin/python"
|
||||
depends_on 'python2' unless File.exist? "#{CREW_PREFIX}/bin/python"
|
||||
|
||||
def self.build
|
||||
system './bootstrap.sh'
|
||||
|
||||
@@ -74,7 +74,7 @@ class Percona_server < Package
|
||||
end
|
||||
|
||||
def self.postinstall
|
||||
unless Dir.exists? "#{CREW_PREFIX}/data"
|
||||
unless Dir.exist? "#{CREW_PREFIX}/data"
|
||||
system "mysqld --initialize-insecure --user=#{USER}"
|
||||
system "mysql_ssl_rsa_setup"
|
||||
end
|
||||
|
||||
@@ -9,7 +9,7 @@ class Phpsysinfo < Package
|
||||
source_url 'https://github.com/phpsysinfo/phpsysinfo/archive/v3.4.1.tar.gz'
|
||||
source_sha256 '377bafea4dc4f1f705cd35df5b95e55034045ab3e7971dc934d1f599157dc3aa'
|
||||
|
||||
depends_on 'php74' unless File.exists? "#{CREW_PREFIX}/bin/php"
|
||||
depends_on 'php74' unless File.exist? "#{CREW_PREFIX}/bin/php"
|
||||
|
||||
def self.install
|
||||
FileUtils.mkdir_p "#{CREW_DEST_PREFIX}/share/phpsysinfo"
|
||||
|
||||
@@ -8,7 +8,7 @@ class Platformsh < Package
|
||||
compatibility 'all'
|
||||
source_url 'SKIP'
|
||||
|
||||
depends_on 'php74' unless File.exists? "#{CREW_PREFIX}/bin/php"
|
||||
depends_on 'php74' unless File.exist? "#{CREW_PREFIX}/bin/php"
|
||||
|
||||
def self.install
|
||||
system "curl -#LO https://github.com/platformsh/platformsh-cli/releases/download/v#{version}/platform.phar"
|
||||
|
||||
@@ -74,13 +74,13 @@ class Postgres < Package
|
||||
end
|
||||
|
||||
def self.remove
|
||||
if Dir.exists? PGDATA
|
||||
if Dir.exist? PGDATA
|
||||
puts "WARNING: This will delete all databases!".orange
|
||||
print "Would you like to remove #{PGDATA}? [y/N] "
|
||||
case STDIN.getc
|
||||
when 'y', 'Y'
|
||||
FileUtils.rm_rf PGDATA
|
||||
if Dir.exists? "#{CREW_PREFIX}/pgsql"
|
||||
if Dir.exist? "#{CREW_PREFIX}/pgsql"
|
||||
FileUtils.rm_rf "#{CREW_PREFIX}/pgsql"
|
||||
end
|
||||
puts "#{PGDATA} removed.".lightred
|
||||
|
||||
@@ -34,7 +34,7 @@ class Pycharm < Package
|
||||
|
||||
def self.remove
|
||||
config_dir = "#{CREW_PREFIX}/.config/.PyCharmCE2021.3"
|
||||
if Dir.exists? config_dir
|
||||
if Dir.exist? config_dir
|
||||
puts "WARNING: This will remove all PyCharm config!".orange
|
||||
print "Would you like to remove the #{config_dir} directory? [y/N] "
|
||||
case STDIN.getc
|
||||
|
||||
@@ -11,5 +11,5 @@ class Snap < Package
|
||||
|
||||
depends_on 'nginx'
|
||||
depends_on 'sqlite'
|
||||
depends_on 'php74' unless File.exists? "#{CREW_PREFIX}/bin/php"
|
||||
depends_on 'php74' unless File.exist? "#{CREW_PREFIX}/bin/php"
|
||||
end
|
||||
|
||||
@@ -42,7 +42,7 @@ class Snowflake < Package
|
||||
|
||||
def self.remove
|
||||
config_dir = "#{HOME}/snowflake-ssh"
|
||||
if Dir.exists? config_dir
|
||||
if Dir.exist? config_dir
|
||||
puts "WARNING: This will remove all saved ssh sessions!".orange
|
||||
print "Would you like to remove the #{config_dir} directory? [y/N] "
|
||||
case STDIN.getc
|
||||
|
||||
@@ -43,7 +43,7 @@ class Stellarium < Package
|
||||
|
||||
def self.remove
|
||||
config_dir = "#{HOME}/.stellarium"
|
||||
if Dir.exists? config_dir
|
||||
if Dir.exist? config_dir
|
||||
print "Would you like to remove the config directory #{config_dir}? [y/N] "
|
||||
case STDIN.getc
|
||||
when "y", "Y"
|
||||
|
||||
@@ -8,7 +8,7 @@ class Terminus < Package
|
||||
compatibility 'all'
|
||||
source_url 'SKIP'
|
||||
|
||||
depends_on 'php74' unless File.exists? "#{CREW_PREFIX}/bin/php"
|
||||
depends_on 'php74' unless File.exist? "#{CREW_PREFIX}/bin/php"
|
||||
|
||||
def self.install
|
||||
system "curl -#LO https://github.com/pantheon-systems/terminus/releases/download/#{version}/terminus.phar"
|
||||
|
||||
@@ -23,7 +23,7 @@ class Vagrant < Package
|
||||
})
|
||||
|
||||
def self.install
|
||||
system "gem install bundle" unless File.exists? "#{CREW_PREFIX}/bin/bundle"
|
||||
system "gem install bundle" unless File.exist? "#{CREW_PREFIX}/bin/bundle"
|
||||
system "bundle install"
|
||||
system "mkdir -p #{CREW_DEST_PREFIX}/bin"
|
||||
FileUtils.cd("#{CREW_DEST_PREFIX}/bin") do
|
||||
|
||||
@@ -8,7 +8,7 @@ class Wp_cli < Package
|
||||
compatibility 'all'
|
||||
source_url 'SKIP'
|
||||
|
||||
depends_on 'php74' unless File.exists? "#{CREW_PREFIX}/bin/php"
|
||||
depends_on 'php74' unless File.exist? "#{CREW_PREFIX}/bin/php"
|
||||
|
||||
def self.build
|
||||
system "curl -#LO https://github.com/wp-cli/wp-cli/releases/download/v#{version}/wp-cli-#{version}.phar"
|
||||
|
||||
@@ -29,7 +29,7 @@ class Xdg_base < Package
|
||||
end
|
||||
if File.directory?("#{HOME}/.local") && !File.symlink?("#{HOME}/.local") && !FileUtils.cp_r("#{HOME}/.local/.",
|
||||
"#{CREW_PREFIX}/.config/")
|
||||
# FileUtils.mkdir_p("#{CREW_PREFIX}/.config") unless Dir.exists? "#{CREW_PREFIX}/.config"
|
||||
# FileUtils.mkdir_p("#{CREW_PREFIX}/.config") unless Dir.exist? "#{CREW_PREFIX}/.config"
|
||||
FileUtils.rm_rf("#{HOME}/.local")
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user