There have been multiple accounts created with the sole purpose of posting advertisement posts or replies containing unsolicited advertising.

Accounts which solely post advertisements, or persistently post them may be terminated.

ShittyBeatlesFCPres ,

I have a similar one but I did it this way:


<span style="color:#323232;">
</span><span style="font-weight:bold;color:#a71d5d;">function </span><span style="font-weight:bold;color:#795da3;">ins </span><span style="color:#323232;">{
</span><span style="color:#323232;">  PACKAGE</span><span style="font-weight:bold;color:#a71d5d;">=</span><span style="color:#183691;">"${</span><span style="color:#323232;">1</span><span style="color:#183691;">}"
</span><span style="color:#323232;">  </span><span style="font-weight:bold;color:#795da3;">exists</span><span style="color:#323232;">() {
</span><span style="color:#323232;">    </span><span style="color:#62a35c;">command </span><span style="color:#323232;">-v </span><span style="color:#183691;">"$</span><span style="color:#323232;">1</span><span style="color:#183691;">" </span><span style="font-weight:bold;color:#a71d5d;">></span><span style="color:#323232;">/dev/null </span><span style="color:#0086b3;">2</span><span style="font-weight:bold;color:#a71d5d;">>&</span><span style="color:#323232;">amp</span><span style="font-weight:bold;color:#a71d5d;">;</span><span style="color:#323232;">1
</span><span style="color:#323232;">  }
</span><span style="color:#323232;">
</span><span style="color:#323232;">  </span><span style="font-weight:bold;color:#a71d5d;">if </span><span style="color:#323232;">exists dnf</span><span style="font-weight:bold;color:#a71d5d;">; then </span><span style="font-style:italic;color:#969896;">#Fedora
</span><span style="color:#323232;">    sudo dnf update </span><span style="font-weight:bold;color:#a71d5d;">&</span><span style="color:#323232;">amp;</span><span style="font-weight:bold;color:#a71d5d;">&</span><span style="color:#323232;">amp</span><span style="font-weight:bold;color:#a71d5d;">; </span><span style="color:#323232;">sudo dnf install -y $PACKAGE
</span><span style="color:#323232;">  </span><span style="font-weight:bold;color:#a71d5d;">elif </span><span style="color:#323232;">exists apt</span><span style="font-weight:bold;color:#a71d5d;">; then </span><span style="font-style:italic;color:#969896;">#Debian
</span><span style="color:#323232;">    sudo apt update </span><span style="font-weight:bold;color:#a71d5d;">&</span><span style="color:#323232;">amp;</span><span style="font-weight:bold;color:#a71d5d;">&</span><span style="color:#323232;">amp</span><span style="font-weight:bold;color:#a71d5d;">; </span><span style="color:#323232;">sudo apt install -y $PACKAGE
</span><span style="color:#323232;">  </span><span style="font-weight:bold;color:#a71d5d;">elif </span><span style="color:#323232;">exists apk</span><span style="font-weight:bold;color:#a71d5d;">; then </span><span style="font-style:italic;color:#969896;">#Alpine
</span><span style="color:#323232;">    apk -U upgrade </span><span style="font-weight:bold;color:#a71d5d;">&</span><span style="color:#323232;">amp;</span><span style="font-weight:bold;color:#a71d5d;">&</span><span style="color:#323232;">amp</span><span style="font-weight:bold;color:#a71d5d;">; </span><span style="color:#323232;">apk add $PACKAGE
</span><span style="color:#323232;">  </span><span style="font-weight:bold;color:#a71d5d;">elif </span><span style="color:#323232;">exists emerge</span><span style="font-weight:bold;color:#a71d5d;">; then </span><span style="font-style:italic;color:#969896;">#Gentoo
</span><span style="color:#323232;">    sudo emerge $PACKAGE
</span><span style="color:#323232;">  </span><span style="font-weight:bold;color:#a71d5d;">elif </span><span style="color:#323232;">exists zypper</span><span style="font-weight:bold;color:#a71d5d;">; then </span><span style="font-style:italic;color:#969896;">#Suse
</span><span style="color:#323232;">    sudo zypper ref </span><span style="font-weight:bold;color:#a71d5d;">&</span><span style="color:#323232;">amp;</span><span style="font-weight:bold;color:#a71d5d;">&</span><span style="color:#323232;">amp</span><span style="font-weight:bold;color:#a71d5d;">; </span><span style="color:#323232;">sudo zypper install $PACKAGE
</span><span style="color:#323232;">  </span><span style="font-weight:bold;color:#a71d5d;">elif </span><span style="color:#323232;">exists pacman</span><span style="font-weight:bold;color:#a71d5d;">; then </span><span style="font-style:italic;color:#969896;">#Arch
</span><span style="color:#323232;">    pacman -S $PACKAGE
</span><span style="color:#323232;">  </span><span style="font-weight:bold;color:#a71d5d;">elif </span><span style="color:#323232;">exists brew</span><span style="font-weight:bold;color:#a71d5d;">; then </span><span style="font-style:italic;color:#969896;">#MacOS
</span><span style="color:#323232;">    brew install $PACKAGE
</span><span style="color:#323232;">  </span><span style="font-weight:bold;color:#a71d5d;">else
</span><span style="color:#323232;">    </span><span style="color:#62a35c;">echo </span><span style="color:#183691;">"Error can't install package $</span><span style="color:#323232;">PACKAGE</span><span style="color:#183691;">. No package manager is detected."
</span><span style="color:#323232;">    </span><span style="color:#62a35c;">exit</span><span style="color:#323232;"> 1</span><span style="font-weight:bold;color:#a71d5d;">;
</span><span style="color:#323232;">  </span><span style="font-weight:bold;color:#a71d5d;">fi
</span><span style="color:#323232;">}
</span>
  • All
  • Subscribed
  • Moderated
  • Favorites
  • [email protected]
  • random
  • lifeLocal
  • goranko
  • All magazines